From: | Alban Hertroys <haramrae(at)gmail(dot)com> |
---|---|
To: | Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com> |
Cc: | "ashmita(dot)j(at)hcl(dot)com" <ashmita(dot)j(at)hcl(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: COPY error with null date |
Date: | 2014-03-24 07:37:09 |
Message-ID: | EAB73DA4-6F63-468D-99D0-B1EA72798A29@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 24 Mar 2014, at 5:32, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)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 first means NULL.
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.
From | Date | Subject | |
---|---|---|---|
Next Message | Eduardo Morras | 2014-03-24 09:00:54 | Re: Upgrading from 9.2 to 9.3 causes performance degradation |
Previous Message | Granthana Biswas | 2014-03-24 04:38:25 | Re: Dead rows not getting removed during vacuum |