On 26/10/2009 18:03, Penrod, John wrote:
> In oracle:
>
> SPOOL filename.txt
> Select * from customer;
> SPOOL OFF
>
> Results are piped to filename.txt
>
>
> How do I do this from the psql command line?
\g <filename> will execute the query and send the result to <filename>.
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie