John Payne, 14.12.2011 02:49:
> 2.Use psql to output the data, as in:
>
> a.\o
>
> b.Query here….
>
> c.\o
>
> The psql produces output in an inconvenient format with pipe symbols and headers and underlines.
You can use the options:
\t
\a
\pset fieldsep ,
to get a more "CSV" like output in psql. If you want a tab character as the field delimiter, you can use:
\pset fieldsep '\t'
So the whole thing would be:
\a
\t
\pset fieldsep ,
\o
SELECT ...
\o
Thomas