[ FOR [ EACH ] { ROW | STATEMENT } ]
[ WHEN ( condition ) ]
EXECUTE PROCEDURE function_name ( arguments )
+
+
where event can be one of:
+
+ INSERT
+ UPDATE [ OF column_name [, ... ] ]
+ DELETE
+ TRUNCATE
event
- One of <command>INSERT, UPDATE>,
- <command>DELETE, or TRUNCATE>;
+ One of <literal>INSERT, UPDATE>,
+ <literal>DELETE, or TRUNCATE>;
this specifies the event that will fire the trigger. Multiple
events can be specified using OR.
- For <command>UPDATE triggers, it is possible to
+ For <literal>UPDATE events, it is possible to
specify a list of columns using this syntax:
UPDATE OF column_name1 [, column_name2 ... ]
The trigger will only fire if at least one of the listed columns
- is mentioned as a target of the update.
+ is mentioned as a target of the UPDATE> command.
- UPDATE INSTEAD OF> triggers do not support lists of columns.
+ INSTEAD OF UPDATE> events do not support lists of columns.
- A column-specific trigger (FOR UPDATE OF
- column_name) will fire when any
+ A column-specific trigger (one defined using the UPDATE OF
+ column_name syntax) will fire when any
of its columns are listed as targets in the UPDATE>
command's SET> list. It is possible for a column's value
to change even when the trigger is not fired, because changes made to the