Re: NULLS and User Input WAS Re: multimaster

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Lew" <lew(at)nospam(dot)lewscanon(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: NULLS and User Input WAS Re: multimaster
Date: 2007-06-07 14:18:33
Message-ID: 87d507n8zq.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Lew" <lew(at)nospam(dot)lewscanon(dot)com> writes:

> Where NULL differs is that (NULL = NULL) is FALSE, and (NULL != NULL) is FALSE.

No, that's not true. NULL=NULL is NULL. And NULL!=NULL is NULL as well. Ie,
it's exactly as your table describes.

The confusion comes because WHERE clauses treat NULL the same as they treat
FALSE, ie, they exclude the row. But unless you can come up with a way for a
SELECT clause to not tell you whether it's including a row or not (ie, whether
it includes the row is "unknown") then it's got to pick one or the other.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2007-06-07 14:23:47 Re: setting login database
Previous Message Alvaro Herrera 2007-06-07 14:02:11 Re: Limitations on 7.0.3?