Rules are objects that store additional SQL commands which are executed whenever a select, insert, delete or update is performed on a table. Unlike triggers, which can be executed on each row modification, rules are executed when the entire table is changed no matter how many rows were modified.
|Event that will execute the rule. Possible values are
ON UPDATE, and
|Mode in which the rule must be executed. If
ALSO is used indicates that the commands stored in the rule must be executed in addition to the original one (that fired the rule). If
INSTEAD is used then the commands stored will be executed in place of the original one.
|A simple SQL conditional expression that returns a boolean value. The expression can't reference any tables as well as use aggregate functions.
|This group of fields is used to handle the commands executed by the rule.