"Jeroen T. Vermeulen" <jtv@xs4all.nl> writes:
> Wouldn't it be more logical, and more compatible, to keep this information
> as regular column information in the PGresult returned by the COPY?
That would work but would require a protocol change, which this is
surely not worth by itself. (We could put it on the to-do list for the
next protocol rev though.)
The bigger question is whether this would do anything to satisfy the
requestor. He probably wants the headings to appear in the file
resulting from COPY TO file (or the psql equivalent), which this would
not do. Providing the info in the COPY PGresult would change nothing
except the behavior of client applications specially rewritten to use it.
regards, tom lane