Re: COPY with column headings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY with column headings
Date: 2004-08-16 15:07:32
Message-ID: 13631.1092668852@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Someone just asked about a COPY capability to supply the column headings
> as the first line of the copy statement. Do we want to support
> something like that?

No. Tell him to use SELECT.

(Such a capability would be a permanent hazard, because any time you
tried to import with the opposite setting from what you'd exported,
you'd either get a failure, or bad data, or silent loss of the first
line of real data.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeroen T. Vermeulen 2004-08-16 15:16:09 Re: COPY with column headings
Previous Message Tom Lane 2004-08-16 14:56:44 Re: Turkish downcasting in PL/pgSQL