Re: Comparisons on NULLs (was Re: A small problem...)

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Comparisons on NULLs (was Re: A small problem...)
Date: 1998-11-04 04:07:49
Message-ID: m0zauEX-0000eRC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thus spake Tom Lane
> >> but I can see the reasonableness of defining "3 != NULL" as TRUE.
>
> > Actually I see it as FALSE. That's what I was suggesting earlier. All
> > comparisons to null should be false no matter what the sense of the
> > test.
>
> Hmm. That yields extremely unintuitive results for = and !=. That is,
>
> SELECT * FROM t WHERE b = NULL;
>
> will never return any rows, even if there are some where b is null;

Hmmm. That would be a problem. Of course, we could treat the null
value at the higher level too. I guess that's why we have the "IS
NULL" syntax in the first place. It is different than comparing the
actual values.

Marc, how long can we hold 6.4 while we work this all out?

--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-11-04 05:22:16 Re: [HACKERS] Re: Comparisons on NULLs (was Re: A small problem...)
Previous Message A James Lewis 1998-11-04 03:07:50 Re: [HACKERS] Warning!!