This section describes the DDL commands pertaining to triggers (added in 3.0).
Define (added in 3.0) a new trigger.
{create | alter} type type-name "{"
create trigger name
after
{insert | update | delete} [, ...]
for {each | all}
do expr
"}"
The command create trigger
nested under create type
or alter type
defines a new trigger for a given object type.
The trigger name must be distinct from that of any existing trigger on the same type.
The options of this command are identical to the SDL trigger declaration (added in 3.0).
Remove a trigger.
alter type type-name "{"
drop trigger name;
"}"
The command drop trigger
inside an alter type
block removes the
definition of an existing trigger on the specified type.
The name (optionally module-qualified) of the type being triggered on.
The name of the trigger.
Remove the log_insert
trigger on the User
type:
alter type User {
drop trigger log_insert;
};
See also |
Schema > Triggers (added in 3.0) |
SDL > Triggers (added in 3.0) |
Introspection > Triggers (added in 3.0) |