Re: Null and Void() - Or, - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Null and Void() - Or,
Date
Msg-id 20060628144918.GC3521@svana.org
Whole thread Raw
In response to Re: Null and Void() - Or,  ("A.M." <agentm@themactionfaction.com>)
List pgsql-general
On Wed, Jun 28, 2006 at 10:43:26AM -0400, A.M. wrote:
> NULL is nothing more than a shortcut. SQL logic has to do backflips to
> accomodate it- notice how NULL!=NULL- indeed, one NULL can mean a variety
> of things even in the same context! ("Bob doesn't know","HR doesn't
> know","No one cares","Not applicable", etc.)

Err, NULL!=NULL => NULL, NULL=NULL => NULL. Comparing NULL with
anything produces NULL, which is neither true nor false. It's straight
three-valued logic. If anything the odd thing is that NULL is
interpreted as false in some contexts.

Yes, there are some places in SQL that need to do strange things with
NULL, but this isn't one of them.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: invalid primary checkpoint record
Next
From: David Fetter
Date:
Subject: Re: Null and Void() - Or, Abandon All Hope Ye Who allow NULLs?