Re: piping output to file - Mailing list pgsql-general

From Adam Ruth
Subject Re: piping output to file
Date
Msg-id C706E1AD-5A73-11D8-A745-000A959D1424@intercation.com
Whole thread Raw
In response to piping output to file  (Russ Schneider <russ@sugapablo.com>)
List pgsql-general
That would depend on the client you're using.  psql can do it either
directly (using \o) or by piping its output:  psql -c "select * from
mytable;" mydb > out.txt

If you're using a programming library, I think you're on your own.

Adam Ruth

On Feb 8, 2004, at 10:28 AM, Russ Schneider wrote:

> Is there an easy way to pipe a select statement's output to a file?
>
> --
> [ Russ Schneider (a.k.a. Sugapablo)     ]
> [ http://www.sugapablo.com <--music     ]
> [ http://www.sugapablo.net <--personal  ]
> [ sugapablo@12jabber.com   <--jabber IM ]
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>


pgsql-general by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [pgsql-advocacy] Fwd: Favorite DB poll on ORA
Next
From: "Ed L."
Date:
Subject: Re: fsync = true beneficial on ext3?