1CREATE CONSTRAINT TRIGGER()      SQL Commands      CREATE CONSTRAINT TRIGGER()
2
3
4

NAME

6       CREATE CONSTRAINT TRIGGER - define a new constraint trigger
7
8

SYNOPSIS

10       CREATE CONSTRAINT TRIGGER name
11           AFTER event [ OR ... ]
12           ON table_name
13           [ FROM referenced_table_name ]
14           { NOT DEFERRABLE | [ DEFERRABLE ] { INITIALLY IMMEDIATE | INITIALLY DEFERRED } }
15           FOR EACH ROW
16           EXECUTE PROCEDURE funcname ( arguments )
17
18

DESCRIPTION

20       CREATE  CONSTRAINT  TRIGGER is used within CREATE TABLE/ALTER TABLE and
21       by pg_dump to create the special triggers  for  referential  integrity.
22       It is not intended for general use.
23

PARAMETERS

25       name   The  name of the constraint trigger. The actual name of the cre‐
26              ated trigger  will  be  of  the  form  RI_ConstraintTrigger_0000
27              (where  0000  is  some number assigned by the server).  Use this
28              assigned name when dropping the trigger.
29
30       event  One of INSERT, UPDATE, or DELETE; this specifies the event  that
31              will  fire  the  trigger. Multiple events can be specified using
32              OR.
33
34       table_name
35              The (possibly schema-qualified) name of the table in  which  the
36              triggering events occur.
37
38       referenced_table_name
39              The  (possibly schema-qualified) name of the table referenced by
40              the constraint. Used by foreign key constraints triggers.
41
42       DEFERRABLE
43
44       NOT DEFERRABLE
45
46       INITIALLY IMMEDIATE
47
48       INITIALLY DEFERRED
49              See the CREATE TABLE [create_table(7)] documentation for details
50              of these constraint options.
51
52       funcname(args)
53              The function to call as part of the trigger processing. See CRE‐
54              ATE TRIGGER [create_trigger(7)] for details.
55

COMPATIBILITY

57       CREATE CONTRAINT TRIGGER is a PostgreSQL extension of the SQL standard.
58
59
60
61SQL - Language Statements         2008-06-08       CREATE CONSTRAINT TRIGGER()
Impressum