From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Pavlo Golub <pavlo(dot)golub(at)gmail(dot)com> |
Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: COPY manual is ambiguous about column list |
Date: | 2019-12-19 16:53:40 |
Message-ID: | 20191219165340.GP30116@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Thu, Nov 28, 2019 at 02:53:03PM +0100, Pavlo Golub wrote:
> On Thu, 28 Nov 2019 at 10:47, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> >
> > On Wed, 2019-11-27 at 17:54 +0000, 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 those columns."
> > >
> > > I clearly see "to or from" file here. But if one tries to COPY FROM filename
> > > with more columns than list specified, the process fails:
> >
> > I think you misunderstood the documentation.
>
> Yeap, I did. Even two of us. Laetitia was helping me :)
>
> >
> > Nowhere in that sentence is the documentation talking about columns in
> > the file, only columns in the table.
> >
> > But if you got it wrong, maybe a clarification would be a good idea.
>
> I think it better to have more details to avoid confusion.
How is the attached patch?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
Attachment | Content-Type | Size |
---|---|---|
copy.diff | text/x-diff | 1.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavlo Golub | 2019-12-19 16:56:38 | Re: COPY manual is ambiguous about column list |
Previous Message | Bruce Momjian | 2019-12-19 16:43:14 | Re: document effect of USAGE on foreign server to dblink |