Re: Sending query to a file

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: Francisco Reyes <lists(at)natserv(dot)com>
Cc: Pgsql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Sending query to a file
Date: 2001-11-10 20:39:59
Message-ID: Pine.LNX.4.30.0111101539110.2354-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Francisco Reyes 2001-11-10 21:15:19 Re: Sending query to a file
Previous Message Francisco Reyes 2001-11-10 20:18:57 Re: SQL Question