Re: No date = bad date?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Lynna Landstreet <lynna(at)gallery44(dot)org>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: No date = bad date?
Date: 2003-06-26 20:26:16
Message-ID: 200306261326.16962.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Hanna 2003-06-26 20:53:42 basic question
Previous Message Lynna Landstreet 2003-06-26 20:19:51 No date = bad date?