Re: COPY manual is ambiguous about column list - Mailing list pgsql-docs

From Tom Lane
Subject Re: COPY manual is ambiguous about column list
Date
Msg-id 14696.1576819950@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY manual is ambiguous about column list  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: COPY manual is ambiguous about column list  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-docs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Seems better to simply talk about each form independently:

> If a list of columns is specified, <command>COPY TO</command> will only
> copy the data in the specified columns to the file.  <command>COPY
> FROM</command> will, by position (i.e., the number of columns listed must
> match the number of columns in the file), match each file column to the
> named column in the table.  Any additional columns present in the table
> will receive their default value.

+1 for separating it like that, but your middle sentence reads awkwardly
to me.  How about something like

  <command>COPY FROM</command> will match each listed column in the table
  to a file column by position (so the number of columns listed must match
  the number of columns in the file).

            regards, tom lane



pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: COPY manual is ambiguous about column list
Next
From: "David G. Johnston"
Date:
Subject: Re: COPY manual is ambiguous about column list