Quantcast
Channel: BSDnexus
Viewing all articles
Browse latest Browse all 17

PostgreSQL CSV output from the CLI

$
0
0

Get CSV output from a postgreSQL database directly from the CLI:

1
psql -A -F ',' -t -c 'select * from tablename;'

You can then, clearly, redirect the output as desired.


Viewing all articles
Browse latest Browse all 17

Trending Articles