Skip site navigation (1) Skip section navigation (2)

Re: Sending query to a file

From: Francisco Reyes <lists(at)natserv(dot)com>
To: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
Cc: Francisco Reyes <lists(at)natserv(dot)com>, Pgsql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Sending query to a file
Date: 2001-11-10 21:15:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Sat, 10 Nov 2001, Brett W. McCoy wrote:

> 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

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

Thanks. That worked.
Is there a better way to use "\g" than running it after running the query
The description says "send query to backend (and results in [file] or
|pipe)". For starters when I do "\g" it doesn't seem to go to the backend.
It processes the last query and I don't get the prompt back until it is

In response to


pgsql-novice by date

Next:From: Brett W. McCoyDate: 2001-11-10 21:32:16
Subject: Re: Sending query to a file
Previous:From: Brett W. McCoyDate: 2001-11-10 20:39:59
Subject: Re: Sending query to a file

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group