Skip to content

Instantly share code, notes, and snippets.

@buithehoa
Created September 22, 2015 09:36
Show Gist options
  • Save buithehoa/edf36e6137f35de4ab34 to your computer and use it in GitHub Desktop.
Save buithehoa/edf36e6137f35de4ab34 to your computer and use it in GitHub Desktop.
Save PostgreSQL output to CSV
COPY (SELECT * FROM foo) T0 '/tmp/foo.csv' WITH CSV;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment