Re: NULL != text ?

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: NULL != text ?
Дата
Msg-id 43585352.8000805@Yahoo.com
обсуждение исходный текст
Ответ на Re: NULL != text ?  (Alban Hertroys <alban@magproductions.nl>)
Список pgsql-general
On 10/20/2005 6:10 AM, Alban Hertroys wrote:

> Michael Glaesemann wrote:
>> if (OLD.value IS NOT NULL and NEW.value IS NOT NULL and OLD.value <>
>> NEW.value) or OLD.value IS NULL or NEW.value IS NULL
>>
>> But that's untested and I have a hard time thinking in three-value  logic.
>
> For completeness sake; Because of lazy evaluation, that boils down to:
>
> if (OLD.value IS NULL OR NEW.value IS NULL OR OLD.value <> NEW.value)

That would result in TRUE if both, OLD and NEW are NULL. Is that what
you intended?


Jan

>
> The last part of the expression is only evaluated if both OLD.value and
> NEW.value aren't NULL.
>


--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #

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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: [pgsql-advocacy] Oracle buys Innobase
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: PSQL suggested enhancement