Re: COPY error with null date

From: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>
To: "ashmita(dot)j(at)hcl(dot)com" <ashmita(dot)j(at)hcl(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY error with null date
Date: 2014-03-24 04:32:27
Message-ID: BF2827DCCE55594C8D7A8F7FFD3AB7713DDDBA85@SZXEML508-MBX.china.huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Granthana Biswas 2014-03-24 04:38:25 Re: Dead rows not getting removed during vacuum
Previous Message Craig Ringer 2014-03-24 01:42:20 Do we have a range of SQLSTATE codes assigned for custom use?