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

Поиск
Список
Период
Сортировка
От darcy@druid.net (D'Arcy J.M. Cain)
Тема Re: Comparisons on NULLs (was Re: A small problem...)
Дата
Msg-id m0zauEX-0000eRC@druid.net
обсуждение исходный текст
Ответ на Comparisons on NULLs (was Re: A small problem...)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Re: Comparisons on NULLs (was Re: A small problem...)
Re: [HACKERS] Re: Comparisons on NULLs (was Re: A small problem...)
Список 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@{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.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: A James Lewis
Дата:
Сообщение: Re: [HACKERS] Warning!!
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Re: Comparisons on NULLs (was Re: A small problem...)