Re: Newbie: Copy from and dates

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Pete Vickers <pete(at)gui-innovations(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Newbie: Copy from and dates
Date: 2002-03-13 22:43:29
Message-ID: 20020314094329.B3439@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Mar 10, 2002 at 12:53:48PM -0800, Pete Vickers wrote:
> Hi,
> I am trying to import a flat file into a database, where the dates may
> or may not be present. Have tried specifying the column as null, or
> default null, but if I try to import an empty date, it fails.
> Is there a way round this please

If you're using COPY, then "\N" represents a null value. You can also
specify what is a null in the copy command itself IIRC.

--
Martijn van Oosterhout <kleptog(at)svana(dot)org>
http://svana.org/kleptog/
> 11/9/2001 - a new beginning or the beginning of the end?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-03-13 23:13:36 Re: Looking for information about rtree index
Previous Message Martijn van Oosterhout 2002-03-13 22:38:39 Re: NEWBIE: Date format/timestamp issue ?