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