Search Postgresql Archives

Re: How to specify that a trigger should fire when column is NOT in SET-clause?

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

 



Adrian Klaver <adrian.klaver@xxxxxxxxxxx> writes:
> On 12/25/20 5:52 AM, Andreas Joseph Krogh wrote:
>> Or - is it possible to check for this in the trigger-function?

> As David Johnson mentioned you can check whether the value for the 
> column is changed:

> NEW.animal <> OLD.animal

Better to use IS DISTINCT FROM, to get sane behavior when one or
the other value is NULL.

			regards, tom lane





[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