Re: null != null ??? - Mailing list pgsql-general

From Rich Shepard
Subject Re: null != null ???
Date
Msg-id Pine.LNX.4.33.0110261150270.7451-100000@salmo.appl-ecosys.com
Whole thread Raw
In response to null != null ???  (Fran Fabrizio <ffabrizio@mmrd.com>)
Responses Re: null != null ???  (Alvaro Herrera <alvherre@atentus.com>)
List pgsql-general
On Fri, 26 Oct 2001, Fran Fabrizio wrote:

> I have a situation where the left and right side of a where clause both
> evaluate to null independently, but when compared to
> each other, they don't equate.  Observe:

> This is an odd result.  Both sides of that where clause evaluate to
> null, so it is null=null, yet this is not evaluating to true

Fran,

  This is exactly how it should be. Instead of 'null' use the word
'unknown'. If you have two unknown values can you say whether or not they
are the same? Of course not! Therefore, comparisons of nulls is meaningless.

HTH,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                         http://www.appl-ecosys.com


pgsql-general by date:

Previous
From: "Roderick A. Anderson"
Date:
Subject: Re: DBD::Pg
Next
From: Paulo Jan
Date:
Subject: Optimizing a complex query (long)