Last active
July 17, 2019 16:51
-
-
Save mrgcohen/75d05b30471f5040895ae16a174c1b54 to your computer and use it in GitHub Desktop.
Export db query to file through stdout postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psql -h host -U username dbname -c "copy (select * from table) TO STDOUT WITH CSV" >> data.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment