Skip to content

Instantly share code, notes, and snippets.

@leesmith
Created November 1, 2011 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leesmith/1331498 to your computer and use it in GitHub Desktop.
Save leesmith/1331498 to your computer and use it in GitHub Desktop.
Dump postgresql table into csv file
COPY (SELECT foo,bar FROM whatever) TO '/tmp/dump.csv' WITH CSV HEADER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment