Re: How to enforce uniqueness when NULL values are present? - Mailing list pgsql-general

From Ron Johnson
Subject Re: How to enforce uniqueness when NULL values are present?
Date
Msg-id 45F3591B.8070109@cox.net
Whole thread Raw
In response to Re: How to enforce uniqueness when NULL values are present?  (Christian Schröder <cs@deriva.de>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/10/07 18:22, Christian Schröder wrote:
> Peter Eisentraut wrote:
[snip]
> I know that it's always dangerous to quote the Wikipedia. Let me do it
> anyway: "Attributes in tables in SQL database management systems can
> optionally be designated as NULL. This indicates that the actual value
> of the column is unknown _or not applicable_."
> (http://en.wikipedia.org/wiki/Null_%28SQL%29) This is exactly what I
> once learned about NULL values, and "not applicable" is exactly why I
> use NULL values in my example.

I've never heard of NULL meaning "not applicable", but only
"unknown".  To me, "not applicable" screams "denormalized".

So, I'd put 1900-01-01 (or whatever is your application's epoch) in
those date fields with NULL values, because that's their effective date.

>
> Regards,
>     Christian
>

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

iD8DBQFF81kbS9HxQb37XmcRAkq/AJ0b6OkNtZZgNFOT/VGvqIWF2bI7DgCg4Emr
lW+BWZseIkg/Vdf6fpK7dOI=
=7jC/
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Christian Schröder
Date:
Subject: Re: How to enforce uniqueness when NULL values are present?
Next
From: Berend Tober
Date:
Subject: Re: How to enforce uniqueness when NULL values are present?