getting query result into a file

Started by Etienne Noumedemover 23 years ago3 messagesgeneral
Jump to latest
#1Etienne Noumedem
etienduval@yahoo.fr

Hi,
Please , can i get a postgresql query result into a
file using for my application ? why?
thank's

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com

#2Bruce Momjian
bruce@momjian.us
In reply to: Etienne Noumedem (#1)
Re: getting query result into a file

Etienne Noumedem wrote:

Hi,
Please , can i get a postgresql query result into a
file using for my application ? why?
thank's

Sure, psql -o file or \g filename.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Bruno Wolff III
bruno@wolff.to
In reply to: Etienne Noumedem (#1)
Re: getting query result into a file

On Tue, Dec 03, 2002 at 12:13:50 +0100,
Etienne Noumedem <etienduval@yahoo.fr> wrote:

Hi,
Please , can i get a postgresql query result into a
file using for my application ? why?
thank's

If you are using the psql interface you can use the \o command to redirect
output to a file.