Re: feature proposal ...
Rod Taylor <pg@rbt.ca>
From: Rod Taylor <pg@rbt.ca>
To: Hans-Jürgen Schönig <postgres@cybertec.at>
Cc: eg@cybertec.at, pgsql-hackers@postgresql.org
Date: 2005-09-21T13:46:00Z
Lists: pgsql-hackers
> the problem is: COPY can write data returned by a SELECT statement to a
> file. our idea is to implement precisely that.
>
> example:
>
> COPY TO file_name USING some_select_statement;
I have run into plenty of cases where I wanted to dump part of a
structure and this could be used for that, but I've always found that
temporary tables were sufficient and equally SQL scriptable
CREATE TEMP TABLE tab AS SELECT ...; COPY tab TO file_name;
--