Re: Help with exporting data - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Help with exporting data
Date
Msg-id 20030304223244.GA9739@svana.org
Whole thread Raw
In response to Help with exporting data  (Brent Wood <b.wood@niwa.co.nz>)
List pgsql-general
Please don't hit reply to any email to start a new thread. This email was
attached to a thread from November 26.

On Fri, Feb 28, 2003 at 03:39:30PM +1300, Brent Wood wrote:

<snip>

> Is there a simpler (& more efficient) way to get the result of a select
> into a plain text file, without the Postgres header/trailer lines & the
> "|" between attributes?

Anyway, psql has a lot of options for controlling it's output. I usually
use:

psql '-F<tab>' -A -t -c "query"

-F    sets delimiter
-A    turns off alignment
-t    turns off header and footer

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.

Attachment

pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: Re: Manuales -Tutoriales
Next
From: "Josh Berkus"
Date:
Subject: Re: pg_ctl -m fast failing?