Re: COPY error with null date - Mailing list pgsql-general

From Alban Hertroys
Subject Re: COPY error with null date
Date
Msg-id EAB73DA4-6F63-468D-99D0-B1EA72798A29@gmail.com
Whole thread Raw
In response to Re: COPY error with null date  (Rajeev rastogi <rajeev.rastogi@huawei.com>)
List 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 by date:

Previous
From: Rajeev rastogi
Date:
Subject: Re: COPY error with null date
Next
From: Eduardo Morras
Date:
Subject: Re: Upgrading from 9.2 to 9.3 causes performance degradation