Skip site navigation (1) Skip section navigation (2)

Re: null != null ???

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: Fran Fabrizio <ffabrizio(at)mmrd(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: null != null ???
Date: 2001-10-26 18:52:01
Message-ID: Pine.LNX.4.33.0110261150270.7451-100000@salmo.appl-ecosys.com (view raw or flat)
Thread:
Lists: 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(at)appl-ecosys(dot)com
                         http://www.appl-ecosys.com


In response to

Responses

pgsql-general by date

Next:From: postgresql_sqlDate: 2001-10-26 19:04:12
Subject: Re: GUID in postgres
Previous:From: Paulo JanDate: 2001-10-26 18:48:06
Subject: Optimizing a complex query (long)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group