Re: COPY to

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY to
Date: 2006-01-07 20:43:48
Message-ID: 20060107204348.GA1232@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ===

In response to

  • COPY to at 2006-01-07 20:13:28 from Angshu Kar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Steinberg 2006-01-07 20:46:31 PGError: server closed the connection unexpectedly
Previous Message Marcos José Setim 2006-01-07 20:38:54 Performance Low Using the Prepare and Execute