Checking inequality

Поиск
Список
Период
Сортировка
От Vitaly Belman
Тема Checking inequality
Дата
Msg-id fa96e3c6041211044264048fa8@mail.gmail.com
обсуждение исходный текст
Ответы Re: Checking inequality  (Michael Fuhr <mike@fuhr.org>)
Re: Checking inequality  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: Checking inequality  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have the following code in one of my trigger functions

---------------------------------------------------------------
IF old.series_id<>new.series_id THEN
...
...
END IF;
---------------------------------------------------------------

The problem is that series_id can change to be NULL in which case I
have problems as "NULL <> 7" doesn't return "true".

What can I do to check inequality even in the case that old or new
series_id is NULL? I'd prefer not to do zillion silly comparisons
(like "IS NULL and IS NOT NULL"). Is there an easy way?

--
 ICQ: 1912453
 AIM: VitalyB1984
 MSN: tmdagent@hotmail.com
 Yahoo!: VitalyBe

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

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: Install pgsql directory
Следующее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: Postgres 7.4.6 x86_64 RPMS