How to specify that a trigger should fire when column is NOT in SET-clause? - Mailing list pgsql-general

From Andreas Joseph Krogh
Subject How to specify that a trigger should fire when column is NOT in SET-clause?
Date
Msg-id VisenaEmail.26.7cbf2947c8d23ceb.1769a2755ff@tc7-visena
Whole thread Raw
Responses Re: How to specify that a trigger should fire when column is NOT in SET-clause?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: How to specify that a trigger should fire when column is NOT in SET-clause?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
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
Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Stats for indexes on expressions
Next
From: "David G. Johnston"
Date:
Subject: Re: How to specify that a trigger should fire when column is NOT in SET-clause?