Help with exporting data - Mailing list pgsql-general

From Brent Wood
Subject Help with exporting data
Date
Msg-id 20030228153157.K75041-100000@storm.niwa.co.nz
Whole thread Raw
In response to Re: GUI for Postgres Management? PostgreSQL vs MySQL.  (Matthew Nuzum <cobalt@bearfruit.org>)
Responses Re: Help with exporting data  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Help with exporting data  (Jason Larke <jlarke@UU.NET>)
List pgsql-general

I have an application which is using Postgres to store/manage it's data.

I'd like to be able to export (to text files) the outputs from queries.

There are two ways I've found I can do this.

I can run a select from a shell & redirect the output to a file, then
reformat the file to plain whitespace delimited values.

I can create a new (possibly temp) table with select into & copy the
resulting table to a file. I can't see any other way in the docs, as copy
won't work with views.


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?


Thanks,

  Brent Wood


pgsql-general by date:

Previous
From: Al Vazquez
Date:
Subject: Help with installation and config, Missing file...
Next
From: "Derrick Rapley"
Date:
Subject: Why PostgreSQL?