From: | Adam Ruth <aruth(at)intercation(dot)com> |
---|---|
To: | Russ Schneider <russ(at)sugapablo(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: piping output to file |
Date: | 2004-02-08 20:17:11 |
Message-ID: | C706E1AD-5A73-11D8-A745-000A959D1424@intercation.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)12jabber(dot)com <--jabber IM ]
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2004-02-08 20:21:36 | Re: Fwd: Favorite DB poll on ORA |
Previous Message | Joshua Drake | 2004-02-08 20:16:42 | Re: Fwd: Favorite DB poll on ORA |