Triggers are objects associated with a table that are used to execute operations stored in special functions when some operation (or event) happens on a single row or over the entire table. The trigger can be activated before or after the following events:
TRUNCATE. There is still a special behavior of a trigger that makes it able to execute the associated procedure instead of a certain event, this kind of trigger is known as
|The type of the trigger being configured. Possible values are
Ordinary trigger and
Constraint trigger. Extra attributes are enabled when configuring constraint triggers.
|Set of events when the trigger should be executed.
|The moment when the trigger must be fired. Possible values are
INSTEAD OF (this value is available only for constraint triggers).
FOR EACH ROW
|The trigger must be executed each time a row changes.
|Function that will be executed when the trigger is fired. The function must return
trigger and take no argument.
Transition table names
|Defines custom names for the transition tables (relations)
NEW during the trigger execution.
|A set of literal arguments optionally passed to the trigger at runtime. These arguments must be treated inside the trigger's function.
|List of columns of the trigger's owner table that, in case of an
UPDATE on them, will fire the trigger. If the trigger is configured with
INSTEAD OF it can't be used with a list of columns.
|This tab handles the constraint trigger attributes. Constraint triggers work like a regular trigger but they can have the firing time adjusted through the command SET CONSTRAINTS.
|Indicates if the constraint trigger can be deferred or not. The deferral mode is configurable only when this option is checked and the accepted values are
INITIALLY IMMEDIATE and
|Table referenced by the constraint trigger.
|A boolean expression that determines when the trigger function will actually be executed.