Re: null value in date field - Mailing list pgsql-general

From Stephan Szabo
Subject Re: null value in date field
Date
Msg-id 20030219124108.X37141-100000@megazone23.bigpanda.com
Whole thread Raw
In response to null value in date field  (Jeff Deroshia <jeff@hal.physast.uga.edu>)
List pgsql-general
On Tue, 18 Feb 2003, Jeff Deroshia wrote:

> I have a form that contains optional DATE fields.  To enter null
> values, I've tried null, 'null', '', '-', '0', 0, and each time I get
> the following error:
>
> ERROR:  Bad numeric input format ''

Are you sure this is on a date field?  Date should be giving you
something like (at least in 7.3):
 ERROR: Bad date external representation ''

Null works for me...
sszabo=# create table test(a date);
CREATE TABLE
sszabo=# insert into test (a) values (null);
INSERT 4256129 1
sszabo=# insert into test (a) values ('');
ERROR:  Bad date external representation ''




pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: How do I upgrade or coexist PostgreSQL on a Cobalt
Next
From: owner
Date:
Subject: Re: Four questions