Re: COPY incorrectly uses null instead of an empty string in last field

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: COPY incorrectly uses null instead of an empty string in last field
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA41EB52B@m0114.s-mxs.net
обсуждение исходный текст
Ответ на COPY incorrectly uses null instead of an empty string in last field  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-hackers
> >> One of the things we've agreed to do in 7.3 is change COPY IN to remove
> >> that assumption --- a line with too few fields (too few tabs) will draw
> >> an error report instead of silently doing what's likely the wrong thing.
>
> > But there will be new syntax for COPY, that allows missing trailing columns.
> > I hope.
>
> Why?

Well, good question. For one for backwards compatibility.
I guess I would prefer COPY syntax that allows you to specify columns
as has been previously discussed. Having that, that would be sufficient
and safer than only a switch.

COPY 'afile' to atab (a1, a3, a5, a2)

Andreas


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

Предыдущее
От: mlw
Дата:
Сообщение: Re: Oracle vs PostgreSQL in real life
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Oracle vs PostgreSQL in real life