Re: NULL TIMESTAM problem
| От | Guy Rouillier |
|---|---|
| Тема | Re: NULL TIMESTAM problem |
| Дата | |
| Msg-id | CC1CF380F4D70844B01D45982E671B230137A79B@mtxexch01.add0.masergy.com обсуждение исходный текст |
| Ответ на | NULL TIMESTAM problem ("Enrique Sánchez" <sancheztru@hotmail.com>) |
| Список | 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
В списке pgsql-general по дате отправления: