]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/alter_trigger.sgml
ee7afa87d89d3239eae1836aaacc88e32769957a
[postgresql] / doc / src / sgml / ref / alter_trigger.sgml
1 <!--
2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_trigger.sgml,v 1.6 2003/09/09 18:28:52 tgl Exp $
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-ALTERTRIGGER">
7  <refmeta>
8   <refentrytitle id="sql-altertrigger-title">ALTER TRIGGER</refentrytitle>
9   <refmiscinfo>SQL - Language Statements</refmiscinfo>
10  </refmeta>
11
12  <refnamediv>
13   <refname>ALTER TRIGGER</refname>
14   <refpurpose>change the definition of a trigger</refpurpose>
15  </refnamediv>
16
17  <indexterm zone="sql-altertrigger">
18   <primary>ALTER TRIGGER</primary>
19  </indexterm>
20
21  <refsynopsisdiv>
22 <synopsis>
23 ALTER TRIGGER <replaceable class="PARAMETER">trigger</replaceable> ON <replaceable class="PARAMETER">table</replaceable>
24     RENAME TO <replaceable class="PARAMETER">newname</replaceable>
25 </synopsis>
26  </refsynopsisdiv>
27
28  <refsect1>
29   <title>Description</title>
30
31   <para>
32    <command>ALTER TRIGGER</command> changes properties of an existing
33    trigger.  The <literal>RENAME</literal> clause changes the name of
34    the given trigger without otherwise changing the trigger
35    definition.
36   </para>
37
38   <para>
39    You must own the table on which the trigger acts to be allowed to change its properties.
40   </para>
41  </refsect1>
42
43  <refsect1>
44   <title>Parameters</title>
45
46   <variablelist>
47    <varlistentry>
48     <term><replaceable class="PARAMETER">trigger</replaceable></term>
49     <listitem>
50      <para>
51       The name of an existing trigger to alter.
52      </para>
53     </listitem>
54    </varlistentry>
55
56    <varlistentry>
57     <term><replaceable class="PARAMETER">table</replaceable></term>
58     <listitem>
59      <para>
60       The name of the table on which this trigger acts.
61      </para>
62     </listitem>
63    </varlistentry>
64
65    <varlistentry>
66     <term><replaceable class="PARAMETER">newname</replaceable></term>
67     <listitem>
68      <para>
69       The new name for the trigger.
70      </para>
71     </listitem>
72    </varlistentry>
73   </variablelist>
74  </refsect1>
75
76  <refsect1>
77   <title>Examples</title>
78
79   <para>
80    To rename an existing trigger:
81 <programlisting>
82 ALTER TRIGGER emp_stamp ON emp RENAME TO emp_track_chgs;
83 </programlisting>
84   </para>
85  </refsect1>
86
87  <refsect1>
88   <title>Compatibility</title>
89
90   <para>
91    <command>ALTER TRIGGER</command> is a <productname>PostgreSQL</>
92    extension of the SQL standard.
93   </para>
94  </refsect1>
95 </refentry>
96
97 <!-- Keep this comment at the end of the file
98 Local variables:
99 mode: sgml
100 sgml-omittag:nil
101 sgml-shorttag:t
102 sgml-minimize-attributes:nil
103 sgml-always-quote-attributes:t
104 sgml-indent-step:1
105 sgml-indent-data:t
106 sgml-parent-document:nil
107 sgml-default-dtd-file:"../reference.ced"
108 sgml-exposed-tags:nil
109 sgml-local-catalogs:"/usr/lib/sgml/catalog"
110 sgml-local-ecat-files:nil
111 End:
112 -->