Search Postgresql Archives

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]

 



Hi.
 
I need to set a value in a trigger if a column is explicitly NOT specified in UPDATE's SET-clause.
 
 
Like for example having a "BEFORE UPDATE OF NOT"
create TRIGGER my_trigger
    BEFORE UPDATE OF NOT modified
    ON my_table
    FOR EACH ROW WHEN (OLD.val <> NEW.val)
EXECUTE PROCEDURE do_stuff();
I want the trigger to be fired when the column "modified" is NOT specified, is it possible?
Or - is it possible to check for this in the trigger-function?
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@xxxxxxxxxx
www.visena.com

[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