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