NULL != text ?

Поиск
Список
Период
Сортировка
От CSN
Тема NULL != text ?
Дата
Msg-id 20051020060437.21214.qmail@web52904.mail.yahoo.com
обсуждение исходный текст
Ответы Re: NULL != text ?  (Michael Glaesemann <grzm@myrealbox.com>)
Re: NULL != text ?  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
I was trying this:

IF (OLD.value != NEW.value) THEN
--
END IF;

and couldn't get the condition to evaluate to true at
all if OLD.value was NULL. I also tried:

IF (OLD.value NOT LIKE NEW.value) THEN
--
END IF;

with the same result. But this works:

IF ((OLD.value is NULL and NEW.value is NOT NULL) or
(OLD.value != NEW.value)) THEN
--
END IF;

So, does NULL != 'abc' always evaluate to false? The
manual
(http://www.postgresql.org/docs/8.0/interactive/functions-comparison.html)
states don't compare NULL values using =, but nothing
about using !=

CSN



__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

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

Предыдущее
От: "Dean Gibson (DB Administrator)"
Дата:
Сообщение: PSQL suggested enhancement
Следующее
От: Greg Stark
Дата:
Сообщение: Re: [HACKERS] 'a' == 'a '