Re: COPY error with null date

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: COPY error with null date
Дата
Msg-id EAB73DA4-6F63-468D-99D0-B1EA72798A29@gmail.com
обсуждение исходный текст
Ответ на Re: COPY error with null date  (Rajeev rastogi <rajeev.rastogi@huawei.com>)
Список pgsql-general
On 24 Mar 2014, at 5:32, Rajeev rastogi <rajeev.rastogi@huawei.com> wrote:

> On 21st March 2014, Ashmita Jain Wrote:
>
> >It is taking date as an empty string.
> >Try defining the empty field as ‘\N’ in your source file.
>
> ‘\N’ in copy source file always results into an empty string (unless something written in new line), which is correct
only.
> So COPY from such source file will always fail except for the case if the column data-type is string.

You appear to be confusing \N with \n. Those are very different escape codes; the second means new line, while the
firstmeans NULL. 

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



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

Предыдущее
От: Rajeev rastogi
Дата:
Сообщение: Re: COPY error with null date
Следующее
От: Eduardo Morras
Дата:
Сообщение: Re: Upgrading from 9.2 to 9.3 causes performance degradation