Re: COPY to - Mailing list pgsql-general

From A. Kretschmer
Subject Re: COPY to
Date
Msg-id 20060107204348.GA1232@webserv.wug-glas.de
Whole thread Raw
In response to COPY to  (Angshu Kar <angshu96@gmail.com>)
Responses Re: COPY to  (Angshu Kar <angshu96@gmail.com>)
List pgsql-general
am  07.01.2006, um 14:13:28 -0600 mailte Angshu Kar folgendes:
> Hi Pgsql,
>
> I want to copy the output of a SELECT query onto a text file. I'm trying to
> use the COPY command for that as :
>
> COPY (SELECT .... ) to 'outfile'

Wrong.

\o output.txt
select ...
\o

And now you have the result in 'output.txt'.


HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Oracle DB Worm Code Published
Next
From: Dave Steinberg
Date:
Subject: PGError: server closed the connection unexpectedly