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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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