Re: Help with exporting data

From: Jason Larke <jlarke(at)UU(dot)NET>
To: Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help with exporting data
Date: 2003-03-04 23:12:09
Message-ID: h24NC9925392.200303042312@heresy.aa.ops.us.uu.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> On Fri, 28 Feb 2003 15:39:30 +1300, Brent Wood
>>>>> <b(dot)wood(at)niwa(dot)co(dot)nz> said:

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

There are psql options to turn off the headers and footers and to
select your own field seperator. You probably want some
combination of

\pset format unaligned
\pset tuples_only
\pset fieldsep 'field_seperator_character'

--
Jason Larke- jlarke(at)uu(dot)net- http://www.nnaf.net/~jlarke Send mail for PGP key
I don't speak for UUNET or Worldcom. I speak for Odin. And he's *pissed*.
Any sufficiently advanced weapon is indistinguishable from a practical joke.
"People change, and smile: but the agony abides."-T.S. Eliot, The Dry Salvages

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-03-04 23:12:56 Re: Unable to delete row on 7.3.2 with schemas
Previous Message Tom Lane 2003-03-04 23:05:07 Re: password method in pg_hba.conf fails