Re: Null and Void() - Or,

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Null and Void() - Or,
Date: 2006-06-28 14:49:18
Message-ID: 20060628144918.GC3521@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2006-06-28 14:59:25 Re: Null and Void() - Or, Abandon All Hope Ye Who allow NULLs?
Previous Message Tom Lane 2006-06-28 14:45:43 Re: invalid primary checkpoint record