Re: bug or feature, || -operator and NULLs

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: bug or feature, || -operator and NULLs
Дата
Msg-id 4538CAAD.4060207@logix-tt.com
обсуждение исходный текст
Ответ на Re: bug or feature, || -operator and NULLs  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Hi, Martijn,

Martijn van Oosterhout wrote:
> On Wed, Oct 18, 2006 at 11:36:44AM -0700, Jeff Davis wrote:
>>> What's being suggested simply violates common sense. Basically:
>>>
>>> if (a = b) then (a||c = b||c)
>>>
>> If a is 'x' and b is 'x' and c is NULL, the above statement doesn't hold
>> in PostgreSQL.
>
> Heh, well, c is supposed to be not NULL. Missed that. I was using the
> equals to include (NULL = NULL) but in SQL it's not like that.

Maybe you should replace "=" with "IS NOT DISTINCT FROM" :-)

HTH,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Asynchronous I/O Support
Следующее
От: Markus Schaber
Дата:
Сообщение: Re: Multiple postmaster + RPM + locale issues