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

From Rajeev rastogi
Subject Re: COPY error with null date
Date
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB7713DDDBA85@SZXEML508-MBX.china.huawei.com
Whole thread Raw
In response to COPY error with null date  (Ashmita Jain <ashmita.j@hcl.com>)
Responses Re: COPY error with null date  (Alban Hertroys <haramrae@gmail.com>)
List pgsql-general

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.

 

In your case COPY is failing or it is able to insert empty string?

 

 

Thanks and Regards,

Kumar Rajeev Rastogi

 

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Do we have a range of SQLSTATE codes assigned for custom use?
Next
From: Alban Hertroys
Date:
Subject: Re: COPY error with null date