Export a database table from Postgres in CSV format
Access the postgres dB:
psql [user] -d [database-name]
To create the .csv file:
\copy [table name] TO name_your_file.csv CSV DELIMITER ',' HEADER
The .csv will be located in your current working directory.
Written by Paul
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Postgres
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#