Thread: Outputting to file

Outputting to file

From
Tom Ansley
Date:
Hi all,

Can anybody point me in the right direction for writing rows of data to a
file.  I know how to put stuff into a database from file but not how to get
stuff out.

Thanks

Tom

Re: Outputting to file

From
Josh Berkus
Date:
Tom,

> Can anybody point me in the right direction for writing rows of data to a
> file.  I know how to put stuff into a database from file but not how to get
> stuff out.

From psql:

\o file_name
SELECT whatever FROM some_table;
\o

See the documentatin on PSQL for more instructions.  Or type \? at the psql
prompt.

-Josh Berkus