Re: COPY manual is ambiguous about column list

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Pavlo Golub <pavlo(dot)golub(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: COPY manual is ambiguous about column list
Date: 2019-12-20 14:13:33
Message-ID: 3148.1576851213@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> OK, how is this?

I do not like the phrasing of

If a column list is
specified in <command>COPY FROM</command>, the number and position of
the columns must match those fields in the file.

I'm not quite sure why, but that reads to me as implying that the COPY
will identify columns of the file by name and match them up. Or at
least it could be read that way by somebody who was predisposed to
believe it. I'd go with something more like

If a column list is
specified in <command>COPY FROM</command>, only the listed columns
are read from the file (whose fields must match the column list).

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2019-12-20 14:29:33 Re: COPY manual is ambiguous about column list
Previous Message Bruce Momjian 2019-12-20 13:45:41 Re: COPY manual is ambiguous about column list