On Dec 5, 2007 9:19 AM, pc <[EMAIL PROTECTED]> 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

Reply via email to