Search Postgresql Archives

Re: Problems with Triggers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Marques wrote:
El Jue 15 Abr 2004 08:55, Sebastian Böck escribió:

Hello,

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

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


(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)

You forgot the parenthesis, to group the conditions accordingly

Yes i did in my mail, but that's not the question. I wanted to know if there is a special operator that does exactly this.

Sebastian


---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux