Jason on Thu, 18 Jul 2002 02:20:08 +0200


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

Re: [PLUG] PostgreSQL question


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 17 July 2002 15H:29, Jon Galt wrote:
> I'm sure someone will let me know if this is off topic.
>
> 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.

You probably have a "NOT NULL" constraint on the date field. Or, it may be 
part of the primary key for the table. Not sure about Postgres, but most 
RDBMS' do not allow NULL values as part of the primary key.

If you are simply adding a date field to an already populated table, it 
usually *must* be NULLable, because none of the existing records would have 
values for the new column.

>
> Thanks,
> 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
> _________________________________________
>

YAMUP (Yet Another Microsoft and Unix Programmer). This describes myself as 
well.

Cheers,
Jason Nocks

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Nge63CryLfCgqRkRAkvvAJ9Z+2qCEY9dNWj1b94+v1/GXYy64QCghqMU
hnCbVjiVsDXQjZJtBv+ukFk=
=66Mg
-----END PGP SIGNATURE-----


______________________________________________________________________
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