Skip to content

Instantly share code, notes, and snippets.

@ksarantakos
Created November 10, 2016 22:01
Show Gist options
  • Save ksarantakos/c0bb4f67fee4bca0e5d4a2d1d25d9b2d to your computer and use it in GitHub Desktop.
Save ksarantakos/c0bb4f67fee4bca0e5d4a2d1d25d9b2d to your computer and use it in GitHub Desktop.
This is how to output CSV from psql
\f ','
\a
\t
\o /tmp/foobar.csv
\SELECT * FROM stuff;
\o
\q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment