From: | "Guy Rouillier" <guyr(at)masergy(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: NULL TIMESTAM problem |
Date: | 2006-03-10 23:17:11 |
Message-ID: | CC1CF380F4D70844B01D45982E671B230137A79B@mtxexch01.add0.masergy.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Enrique Sánchez wrote:
> Hi! I'm new in Postgres.
>
> I nedd to fill a database table x from a file With the COPY command
> an the delimiter '*'.
> This table has a timestamp null column (I declared like: ' birthday
> timestamp NULL' ).
>
> But when I try to insert NULL values(specified in the file), postgres
> throw an error.
>
>
> I don't know how can I specify this NULL value wkthout an '\N'
> character.
I created a table t1 with 3 columns, all nullable:
f1 int
f2 timestamp
f3 int
Using the following input file t1.csv:
5,NULL,7
8,NULL,10
The following COPY command successfully put those rows in the table, with f2 null:
copy t1 (f1, f2, f3)
from 't1.csv'
null as 'NULL'
csv;
--
Guy Rouillier
From | Date | Subject | |
---|---|---|---|
Next Message | Hongxi.Ma | 2006-03-11 02:46:23 | Re: Baffled by failure to use index when WHERE uses a function |
Previous Message | Emi Lu | 2006-03-10 20:45:11 | Re: in Pl/PgSQL, do commit every 5000 records |