Re: Help with exporting data

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz>
Cc: Aleksei Wolff <aleksei_wolff(at)yahoo(dot)com>, Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help with exporting data
Date: 2003-03-04 22:32:44
Message-ID: 20030304223244.GA9739@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2003-03-04 22:35:39 Re: pg and chroot (performance)
Previous Message Josh Berkus 2003-03-04 22:26:55 Re: pg_ctl -m fast failing?