1DROP TRIGGER() SQL Commands DROP TRIGGER()
2
3
4
6 DROP TRIGGER - remove a trigger
7
8
10 DROP TRIGGER [ IF EXISTS ] name ON table [ CASCADE | RESTRICT ]
11
12
14 DROP TRIGGER will remove an existing trigger definition. To execute
15 this command, the current user must be the owner of the table for which
16 the trigger is defined.
17
19 IF EXISTS
20 Do not throw an error if the trigger does not exist. A notice is
21 issued in this case.
22
23 name The name of the trigger to remove.
24
25 table The name (optionally schema-qualified) of the table for which
26 the trigger is defined.
27
28 CASCADE
29 Automatically drop objects that depend on the trigger.
30
31 RESTRICT
32 Refuse to drop the trigger if any objects depend on it. This is
33 the default.
34
36 Destroy the trigger if_dist_exists on the table films:
37
38 DROP TRIGGER if_dist_exists ON films;
39
40
42 The DROP TRIGGER statement in PostgreSQL is incompatible with the SQL
43 standard. In the SQL standard, trigger names are not local to tables,
44 so the command is simply DROP TRIGGER name.
45
47 CREATE TRIGGER [create_trigger(7)]
48
49
50
51SQL - Language Statements 2008-06-08 DROP TRIGGER()