Re: COPY manual is ambiguous about column list

2019-12-21 Thread Bruce Momjian
On Fri, Dec 20, 2019 at 09:45:35AM -0700, David G. Johnston wrote: > On Fri, Dec 20, 2019 at 9:21 AM Tom Lane wrote: > > Bruce Momjian writes: > > OK, this wording is obviously harder than I thought.  Updated patch > > attached. > > That one works for me. > >   > Me too. Patch

Re: COPY manual is ambiguous about column list

2019-12-20 Thread David G. Johnston
On Fri, Dec 20, 2019 at 9:21 AM Tom Lane wrote: > Bruce Momjian writes: > > OK, this wording is obviously harder than I thought. Updated patch > > attached. > > That one works for me. > Me too. David J.

Re: COPY manual is ambiguous about column list

2019-12-20 Thread Tom Lane
Bruce Momjian writes: > OK, this wording is obviously harder than I thought. Updated patch > attached. That one works for me. regards, tom lane

Re: COPY manual is ambiguous about column list

2019-12-20 Thread Bruce Momjian
On Fri, Dec 20, 2019 at 07:29:33AM -0700, David G. Johnston wrote: > This has the same "match by name" possibility when I read it... > > I don't see the benefit of repeating "If a column list is specified" a second > time in the three sentence paragraph.  To a lesser extent the same goes for > th

Re: COPY manual is ambiguous about column list

2019-12-20 Thread David G. Johnston
On Fri, Dec 20, 2019 at 7:13 AM Tom Lane wrote: > Bruce Momjian writes: > > OK, how is this? > > I do not like the phrasing of > > If a column list is > specified in COPY FROM, the number and position of > the columns must match those fields in the file. > > I'm not quite sure why, b

Re: COPY manual is ambiguous about column list

2019-12-20 Thread Tom Lane
Bruce Momjian writes: > OK, how is this? I do not like the phrasing of If a column list is specified in COPY FROM, 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

Re: COPY manual is ambiguous about column list

2019-12-20 Thread Bruce Momjian
On Thu, Dec 19, 2019 at 10:33:48PM -0700, David G. Johnston wrote: > On Thursday, December 19, 2019, Tom Lane wrote: > > "David G. Johnston" writes: > > Seems better to simply talk about each form independently: > > > If a list of columns is specified, COPY TO will only > > copy

Re: COPY manual is ambiguous about column list

2019-12-19 Thread David G. Johnston
On Thursday, December 19, 2019, Tom Lane wrote: > "David G. Johnston" writes: > > Seems better to simply talk about each form independently: > > > If a list of columns is specified, COPY TO will only > > copy the data in the specified columns to the file. COPY > > FROM will, by position (i.e.,

Re: COPY manual is ambiguous about column list

2019-12-19 Thread Tom Lane
"David G. Johnston" writes: > Seems better to simply talk about each form independently: > If a list of columns is specified, COPY TO will only > copy the data in the specified columns to the file. COPY > FROM will, by position (i.e., the number of columns listed must > match the number of colum

Re: COPY manual is ambiguous about column list

2019-12-19 Thread David G. Johnston
On Thu, Dec 19, 2019 at 9:46 PM Tom Lane wrote: > Bruce Momjian writes: > > How is the attached patch? > > !In COPY FROM, the number of columns specified > !must match the number of fields in the file; any table columns not > !specified in the COPY FROM column list will insert > !

Re: COPY manual is ambiguous about column list

2019-12-19 Thread Tom Lane
Bruce Momjian writes: > How is the attached patch? !In COPY FROM, the number of columns specified !must match the number of fields in the file; any table columns not !specified in the COPY FROM column list will insert !their default values. Phrasing seems a bit weird to me: you'

Re: COPY manual is ambiguous about column list

2019-12-19 Thread Pavlo Golub
On Thu, 19 Dec 2019 at 17:53, Bruce Momjian wrote: > > On Thu, Nov 28, 2019 at 02:53:03PM +0100, Pavlo Golub wrote: > > On Thu, 28 Nov 2019 at 10:47, Laurenz Albe wrote: > > > > > > On Wed, 2019-11-27 at 17:54 +, PG Doc comments form wrote: > > > > "If a list of columns is specified, COPY wil

Re: COPY manual is ambiguous about column list

2019-12-19 Thread Bruce Momjian
On Thu, Nov 28, 2019 at 02:53:03PM +0100, Pavlo Golub wrote: > On Thu, 28 Nov 2019 at 10:47, Laurenz Albe wrote: > > > > On Wed, 2019-11-27 at 17:54 +, PG Doc comments form wrote: > > > "If a list of columns is specified, COPY will only copy the data in the > > > specified columns to or from t

Re: COPY manual is ambiguous about column list

2019-11-28 Thread Pavlo Golub
On Thu, 28 Nov 2019 at 10:47, Laurenz Albe wrote: > > On Wed, 2019-11-27 at 17:54 +, PG Doc comments form wrote: > > "If a list of columns is specified, COPY will only copy the data in the > > specified columns to or from the file. If there are any columns in the table > > that are not in the

Re: COPY manual is ambiguous about column list

2019-11-28 Thread Laurenz Albe
On Wed, 2019-11-27 at 17:54 +, PG Doc comments form wrote: > "If a list of columns is specified, COPY will only copy the data in the > specified columns to or from the file. If there are any columns in the table > that are not in the column list, COPY FROM will insert the default values > for t

COPY manual is ambiguous about column list

2019-11-27 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/12/sql-copy.html Description: "If a list of columns is specified, COPY will only copy the data in the specified columns to or from the file. If there are any columns in the table that are not