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