> 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; -- ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster