Michael Glaesemann wrote:
if (OLD.value IS NOT NULL and NEW.value IS NOT NULL and OLD.value <>
NEW.value) or OLD.value IS NULL or NEW.value IS NULL
But that's untested and I have a hard time thinking in three-value logic.
For completeness sake; Because of lazy evaluation, that boils down to:
if (OLD.value IS NULL OR NEW.value IS NULL OR OLD.value <> NEW.value)
The last part of the expression is only evaluated if both OLD.value and
NEW.value aren't NULL.
--
Alban Hertroys
alban@xxxxxxxxxxxxxxxxx
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
//Showing your Vision to the World//
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match