Re: valid NULL DATE value

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: valid NULL DATE value
Дата
Msg-id Pine.LNX.4.30.0108241528250.677-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: valid NULL DATE value  ("Oliver Elphick" <olly@lfix.co.uk>)
Ответы Re: valid NULL DATE value  (Tony Grant <tony@animaproductions.com>)
Список pgsql-general
Oliver Elphick writes:

> Tony Grant wrote:
>   >Hello,
>   >
>   >I am importing via pgaccess a text file from another non-postgres
>   >database and the NULL DATE values are written like 00/00/00.
>   >
>   >What I have tried is replacing 00/00/00 by 9/9/1999 and setting the
>   >style to european and I am getting 'can't parse /9/1999' errors.
>   >
>   >How do I go about importing DATE?
>
> With INSERT, leave the field out of the list or insert NULL.
>
> With COPY, specify NULL as \N.  (You can redefine that - see COPY syntax.)

Hmm, you could use COPY ... WITH NULL AS '00/00/00', though that may spell
trouble if any non-date fields usefully contain that value.  (Probably
unlikely.)

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: number of parameters to a stored procedure
Следующее
От: Tom Lane
Дата:
Сообщение: Re: store in bytea