> Just for the sake of completeness... > > If the value (empname in the above example) can be NULL, the compare does not work, because > > SELECT NULL = NULL > > returns NULL which is treated as FALSE. > > But I am sure you know this :-) > > > HTH, > > Ladislav Lenart > > ___________________________ > > Right. And that's why you use very nice option provided by PG: > > IF NEW.empname IS DISTINCT FROM OLD.empname THEN > > which again you probably know :) > > Regards, > Igor Neyman
Yep, I got there pretty quickiy. IS [NOT] DISTINCT FROM is pretty cool stuff!