Can't copy empty value to datatype 'timestamp'

From: Jon Thorson <oinos(at)darkgeek(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Can't copy empty value to datatype 'timestamp'
Date: 2003-01-09 06:50:58
Message-ID: 1042095057.12492.25.camel@ulysses.darkgeek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm running into a problem importing data into my database. What seems
to be the issue is an empty value on a field defined as 'timestamp'. In
psql I'm using the following command to import the data:

copy devicem1 from '/data/tmp/scshadow/devicem1.out' delimiter '|';

I get the following error:

ERROR: copy: line 1, Bad timestamp external representation ''

There are 109 fields in this table, four fields with the datatype of
'timestamp'. The data that I am trying to import has the first two of
the timestamp fields populated, and the last two are for future use.
The definition for each timestamp field is simply:

"<field name>" timestamp,

I've tried specifically allowing null values to the fields, but I still
get the same error. I would include a sample row but it's rather long
and it would get mangled with the word wrap of my email client. Suffice
it to say that the data is pipe delimited and the fields that are empty
look like "||" (minus the double quotes, of course).

The verison of psql is:

PostgreSQL 7.3.1 on i686-pc-linux-gnu, compiled by GCC 2.95.3

Any help is greatly appreciated.

Thanks.

-j

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-01-09 06:56:28 Re: Can't copy empty value to datatype 'timestamp'
Previous Message Magnus Naeslund(f) 2003-01-09 03:06:24 Re: PostgreSQL + Visual Basic .NET