Re: No date = bad date? - Mailing list pgsql-novice

From Josh Berkus
Subject Re: No date = bad date?
Date
Msg-id 200306261326.16962.josh@agliodbs.com
Whole thread Raw
In response to No date = bad date?  (Lynna Landstreet <lynna@gallery44.org>)
Responses Re: No date = bad date?  (Lynna Landstreet <lynna@gallery44.org>)
List pgsql-novice
Lynna,

> Does anyone know of some reason why importing a text file that contains no
> data for one date field would cause psql to tell me:
>
> ERROR:  copy: line 1, Bad date external representation ''
> lost synchronization with server, resetting connection

Yes.  For the "blank" date, you need to have an \N marker to indicate a NULL.
Or you need to change your copy parameters to indicate that a zero length
string is a NULL; check the COPY docs for details.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


pgsql-novice by date:

Previous
From: Lynna Landstreet
Date:
Subject: No date = bad date?
Next
From: Michael Hanna
Date:
Subject: basic question