Debian Codegraph @

doc/src/sgml/ref/drop_event_trigger.sgml

raw
1 <!--
2 doc/src/sgml/ref/drop_event_trigger.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="sql-dropeventtrigger">
7 <indexterm zone="sql-dropeventtrigger">
8 <primary>DROP EVENT TRIGGER</primary>
9 </indexterm>
10
11 <refmeta>
12 <refentrytitle>DROP EVENT TRIGGER</refentrytitle>
13 <manvolnum>7</manvolnum>
14 <refmiscinfo>SQL - Language Statements</refmiscinfo>
15 </refmeta>
16
17 <refnamediv>
18 <refname>DROP EVENT TRIGGER</refname>
19 <refpurpose>remove an event trigger</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23 <synopsis>
24 DROP EVENT TRIGGER [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ CASCADE | RESTRICT ]
25 </synopsis>
26 </refsynopsisdiv>
27
28 <refsect1>
29 <title>Description</title>
30
31 <para>
32 <command>DROP EVENT TRIGGER</command> removes an existing event trigger.
33 To execute this command, the current user must be the owner of the event
34 trigger.
35 </para>
36 </refsect1>
37
38 <refsect1>
39 <title>Parameters</title>
40
41 <variablelist>
42
43 <varlistentry>
44 <term><literal>IF EXISTS</literal></term>
45 <listitem>
46 <para>
47 Do not throw an error if the event trigger does not exist. A notice
48 is issued in this case.
49 </para>
50 </listitem>
51 </varlistentry>
52
53 <varlistentry>
54 <term><replaceable class="parameter">name</replaceable></term>
55 <listitem>
56 <para>
57 The name of the event trigger to remove.
58 </para>
59 </listitem>
60 </varlistentry>
61
62 <varlistentry>
63 <term><literal>CASCADE</literal></term>
64 <listitem>
65 <para>
66 Automatically drop objects that depend on the trigger,
67 and in turn all objects that depend on those objects
68 (see <xref linkend="ddl-depend"/>).
69 </para>
70 </listitem>
71 </varlistentry>
72
73 <varlistentry>
74 <term><literal>RESTRICT</literal></term>
75 <listitem>
76 <para>
77 Refuse to drop the trigger if any objects depend on it. This is
78 the default.
79 </para>
80 </listitem>
81 </varlistentry>
82 </variablelist>
83 </refsect1>
84
85 <refsect1 id="sql-dropeventtrigger-examples">
86 <title>Examples</title>
87
88 <para>
89 Destroy the trigger <literal>snitch</literal>:
90
91 <programlisting>
92 DROP EVENT TRIGGER snitch;
93 </programlisting></para>
94 </refsect1>
95
96 <refsect1 id="sql-dropeventtrigger-compatibility">
97 <title>Compatibility</title>
98
99 <para>
100 There is no <command>DROP EVENT TRIGGER</command> statement in the
101 SQL standard.
102 </para>
103
104 </refsect1>
105
106 <refsect1>
107 <title>See Also</title>
108
109 <simplelist type="inline">
110 <member><xref linkend="sql-createeventtrigger"/></member>
111 <member><xref linkend="sql-altereventtrigger"/></member>
112 </simplelist>
113 </refsect1>
114
115 </refentry>