PostgreSQL 8.2.23 Documentation | ||||
---|---|---|---|---|
Prev | Fast Backward | Fast Forward | Next |
CREATE CONSTRAINT TRIGGER name AFTER event [ OR ... ] ON table_name [ FROM referenced_table_name ] { NOT DEFERRABLE | [ DEFERRABLE ] { INITIALLY IMMEDIATE | INITIALLY DEFERRED } } FOR EACH ROW EXECUTE PROCEDURE funcname ( arguments )
CREATE CONSTRAINT TRIGGER is used within CREATE TABLE/ALTER TABLE and by pg_dump to create the special triggers for referential integrity. It is not intended for general use.
The name of the constraint trigger. The actual name of the created trigger will be of the form RI_ConstraintTrigger_0000 (where 0000 is some number assigned by the server). Use this assigned name when dropping the trigger.
One of INSERT, UPDATE, or DELETE; this specifies the event that will fire the trigger. Multiple events can be specified using OR.
The (possibly schema-qualified) name of the table in which the triggering events occur.
The (possibly schema-qualified) name of the table referenced by the constraint. Used by foreign key constraints triggers.
See the CREATE TABLE documentation for details of these constraint options.
The function to call as part of the trigger processing. See CREATE TRIGGER for details.