Re: Sending query to a file - Mailing list pgsql-novice

From Brett W. McCoy
Subject Re: Sending query to a file
Date
Msg-id Pine.LNX.4.30.0111101539110.2354-100000@chapelperilous.net
Whole thread Raw
In response to Sending query to a file  (Francisco Reyes <lists@natserv.com>)
Responses Re: Sending query to a file
List pgsql-novice
On Sat, 10 Nov 2001, Francisco Reyes wrote:

> What is the best way to send a query to an ASCII file?
> I have been using "\g", but that seems to require doing the query twice. I
> do a query and when done I then do '\g <filename>'. It works, but for a
> lengthy query it can take very long having to do the query twice.

\o <file> will send the results of queries to a file.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
Courage is your greatest present need.


pgsql-novice by date:

Previous
From: Francisco Reyes
Date:
Subject: Re: SQL Question
Next
From: Francisco Reyes
Date:
Subject: Re: Sending query to a file