Re: Problems with Triggers

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Sebastian Böck <sebastianboeck(at)freenet(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems with Triggers
Date: 2004-04-15 16:32:10
Message-ID: 20040415093108.S31418@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 15 Apr 2004, [ISO-8859-1] Sebastian Bck wrote:

> is there a simple operator to determine whether the OLD.value and
> NEW.value are different. The <> operator is not working on NULL's.

Not as far as I know, although I think you can simplify the last part as
(NEW.val IS NULL <> OLD.val IS NULL)

> I need something like this:
> NEW.val <> Old.val OR
> NEW.val IS NULL AND OLD.val IS NOT NULL OR
> NEW.val IS NOT NULL AND OLD.val IS NULL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-04-15 16:51:40 Re: performance problem aftrer update from 7.1 to 7.4.2
Previous Message Development - multi.art.studio 2004-04-15 16:30:35 Re: performance problem aftrer update from 7.1 to 7.4.2