Hans-Jürgen Schönig <postgres@cybertec.at> writes:
> COPY TO file_name USING some_select_statement;
I think this has been discussed before, check the archives.
> to implement the desired feature we just had to add some SPI code to the
> scenery (SPI will also return HeapTuples so it should fit in there).
Any implementation that depends on SPI here is wrong.
regards, tom lane