Re: COPY manual is ambiguous about column list

Поиск
Список
Период
Сортировка
От Pavlo Golub
Тема Re: COPY manual is ambiguous about column list
Дата
Msg-id CAMtUEpBmq3Mefkyh=RmkC4Fuqq+YtbUrr_nHnzxUwEbwm+CPfg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: COPY manual is ambiguous about column list  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: COPY manual is ambiguous about column list  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs
On Thu, 28 Nov 2019 at 10:47, Laurenz Albe <laurenz.albe@cybertec.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.

>
> Yours,
> Laurenz Albe
>


-- 
--
Hoc est vivere bis, vita posse priore frui.
Nullus est in vitae sensus, ipsa vera est sensus.



В списке pgsql-docs по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: COPY manual is ambiguous about column list
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Example not producing shown output