where EventX
is one of INSERT, DELETE, UPDATE
Only relation owner may create a trigger on this relation.
Currently, STATEMENT triggers are not implemented.
The trigger can be specified to fire either before the operation is attempted on a tuple (e.g. before constraints are checked and the insert/update/delete is attempted) or after the operation has been attempted (e.g. after constraints are checked and the insert/update/delete has completed). If the trigger fires before then the trigger may skip the operation for the current tuple, or change tuple being inserted (for insert/update operations only). If the trigger fires after then all changes including the last insertion/updation/deletion are "visible" to trigger.
Refer to the SPI and trigger programming guides for more information.