Checking inequality - Mailing list pgsql-general

From Vitaly Belman
Subject Checking inequality
Date
Msg-id fa96e3c6041211044264048fa8@mail.gmail.com
Whole thread Raw
Responses Re: Checking inequality
Re: Checking inequality
Re: Checking inequality
List 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 by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: Install pgsql directory
Next
From: Devrim GUNDUZ
Date:
Subject: Re: Postgres 7.4.6 x86_64 RPMS