Jon Galt on Thu, 18 Jul 2002 16:30:13 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] PostgreSQL answer


On Wed, 17 Jul 2002, Jon Galt wrote:

> Does anybody know why I can't seem to have a nullable date field in my PG
> database?  The field is to hold the date of an event, if the event
> occurred, and nothing if the event didn't occur.

In case anybody is interested, the main problem was that I was trying to
import the data from a csv file, and PostgreSQL didn't like empty date
fields.  I had to add \N to the csv data for the null date fields.  It
accepted other empty fields just fine, without the \N.

Before I realized I needed the \N, I imported the data with a bogus date
value for any dates that should be null.  When I tried to delete the value
(using PhpPgAdmin), it wouldn't let me.  This is what made me think I
couldn't have a nullable date field.

Thanks for the responses,
Wayne
_________________________________________

Need an experienced programmer who knows
both the Unix and Microsoft worlds?

Then you need to hire Wayne:
http://hirewayne.com

wayne@hirewayne.com
_________________________________________


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug