From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
Cc: | Tony Grant <tony(at)animaproductions(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: valid NULL DATE value |
Date: | 2001-08-24 13:29:27 |
Message-ID: | Pine.LNX.4.30.0108241528250.677-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmx(dot)net http://funkturm.homeip.net/~peter
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Bergmann | 2001-08-24 13:33:39 | libpq |
Previous Message | Tom Lane | 2001-08-24 13:28:17 | Re: store in bytea |