Re: how to redirect output to a file - Mailing list pgsql-general

From Usama Dar
Subject Re: how to redirect output to a file
Date
Msg-id ff0e67090712060519s5948a39ak479832ccfe8ff741@mail.gmail.com
Whole thread Raw
In response to how to redirect output to a file  (pc <chavanpriya@gmail.com>)
List pgsql-general


On Dec 5, 2007 9:19 AM, pc <chavanpriya@gmail.com> wrote:
Hi,

How to redirect the output of an sql command to a file?
Thanks in advance

if you are using psql

postgres=# \o ~/sql.out
postgres=# select * from foo;

the output will be directed to a file, when you need to stop doing it

postgres=# \o






---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend



--
Usama Munir Dar http://linkedin.com/in/usamadar
Consultant Architect
Cell:+92 321 5020666
Skype: usamadar

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: Avoid huge perfomance loss on string concatenation
Next
From: "A. Kretschmer"
Date:
Subject: Re: how to redirect output to a file