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
|
Список | 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 по дате отправления: