Re: COPY with column headings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY with column headings
Date: 2004-08-16 15:30:49
Message-ID: 13920.1092670249@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jeroen T. Vermeulen" <jtv(at)xs4all(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeroen T. Vermeulen 2004-08-16 15:45:22 Re: COPY with column headings
Previous Message Bruce Momjian 2004-08-16 15:28:05 Re: COPY with column headings