Inserting a Null date. - Mailing list pgsql-novice

From Rob Mosher
Subject Inserting a Null date.
Date
Msg-id 401E7923.3090505@andrews.edu
Whole thread Raw
Responses Re: Inserting a Null date.  (Josh Berkus <josh@agliodbs.com>)
Re: Inserting a Null date.  (Josh Berkus <josh@agliodbs.com>)
Re: Inserting a Null date.  (Nabil Sayegh <postgresql@e-trolley.de>)
List pgsql-novice
I am trying to add entries to my database via a Perl script, where some
fields are optional, that is, nulls are allowed. When inserting an
entry, I include every field in the insert statement, but leave their
value undefined if it is optional and left blank. This works for every
field but date fields. Setting a date field to undefined generates the
error "Bad date external representation". Is there a way to leave a date
field null while still having it as an argument in an insert (i.e. INSET
INTO table (id, mydate) VALUES (1, NULL) ), or will I need to make
several different insertion statements for each different case?

Thank you,
Rob Mosher

pgsql-novice by date:

Previous
From: Iandé Coutinho
Date:
Subject: Encrypting and compiling
Next
From: remi@internetworker.net (Remi)
Date:
Subject: Postgresql And Redhat Enterprise 3