November 2019
Beginner to intermediate
470 pages
11h 59m
English
For those of you using psql to work with PostgreSQL, there is more—psql can't display data in CSV format, as shown in the next listing:
test=# \pset format csvOutput format is csv.test=# SELECT id, id FROM generate_series(1, 4) AS id;id,id1,12,23,34,4
This is especially useful if you are using psql in a shell script and if you are piping data from one program to the next. If you always want to get data in CSV format, you can add the pset command to your .psqlrc file.
Read now
Unlock full access