head	1.13;
access;
symbols
	REL9_0_0:1.13
	REL9_1_ALPHA1:1.13
	REL9_0_RC1:1.13
	REL9_0_BETA4:1.13
	REL9_0_STABLE:1.13.0.2
	REL9_0_BETA3:1.13
	REL9_0_BETA2:1.13
	REL7_4_29:1.7
	REL8_0_25:1.8
	REL8_1_21:1.9
	REL8_2_17:1.10
	REL8_3_11:1.10
	REL8_4_4:1.11
	REL9_0_BETA1:1.13
	REL9_0_ALPHA5_BRANCH:1.12.0.8
	REL9_0_ALPHA5:1.12
	REL7_4_28:1.7
	REL8_0_24:1.8
	REL8_1_20:1.9
	REL8_2_16:1.10
	REL8_3_10:1.10
	REL8_4_3:1.11
	REL9_0_ALPHA4:1.12
	REL9_0_ALPHA4_BRANCH:1.12.0.6
	REL8_5_ALPHA3:1.12
	REL8_5_ALPHA3_BRANCH:1.12.0.4
	REL7_4_27:1.7
	REL8_0_23:1.8
	REL8_1_19:1.9
	REL8_2_15:1.10
	REL8_3_9:1.10
	REL8_4_2:1.11
	REL8_5_ALPHA2:1.12
	REL8_5_ALPHA2_BRANCH:1.12.0.2
	REL7_4_26:1.7
	REL8_0_22:1.8
	REL8_1_18:1.9
	REL8_2_14:1.10
	REL8_3_8:1.10
	REL8_4_1:1.11
	REL8_5_ALPHA1:1.11
	REL8_5_ALPHA1_BRANCH:1.11.0.4
	REL8_4_STABLE:1.11.0.2
	REL8_4_0:1.11
	REL8_4_RC2:1.11
	REL8_4_RC1:1.11
	REL8_4_BETA2:1.11
	REL8_4_BETA1:1.11
	REL7_4_25:1.7
	REL8_0_21:1.8
	REL8_1_17:1.9
	REL8_2_13:1.10
	REL8_3_7:1.10
	REL7_4_24:1.7
	REL8_0_20:1.8
	REL8_1_16:1.9
	REL8_2_12:1.10
	REL8_3_6:1.10
	REL7_4_23:1.7
	REL8_0_19:1.8
	REL8_1_15:1.9
	REL8_2_11:1.10
	REL8_3_5:1.10
	REL7_4_22:1.7
	REL8_0_18:1.8
	REL8_1_14:1.9
	REL8_2_10:1.10
	REL8_3_4:1.10
	REL7_4_21:1.7
	REL8_0_17:1.8
	REL8_1_13:1.9
	REL8_2_9:1.10
	REL8_3_3:1.10
	REL7_4_20:1.7
	REL8_0_16:1.8
	REL8_1_12:1.9
	REL8_2_8:1.10
	REL8_3_2:1.10
	REL8_2_7:1.10
	REL8_3_1:1.10
	REL8_3_STABLE:1.10.0.4
	REL8_3_0:1.10
	REL8_3_RC2:1.10
	REL7_3_21:1.2
	REL7_4_19:1.7
	REL8_0_15:1.8
	REL8_1_11:1.9
	REL8_2_6:1.10
	REL8_3_RC1:1.10
	REL8_3_BETA4:1.10
	REL8_3_BETA3:1.10
	REL8_3_BETA2:1.10
	REL8_3_BETA1:1.10
	REL7_3_20:1.2
	REL7_4_18:1.7
	REL8_0_14:1.8
	REL8_1_10:1.9
	REL8_2_5:1.10
	REL7_3_19:1.2
	REL7_4_17:1.7
	REL8_0_13:1.8
	REL8_1_9:1.9
	REL8_2_4:1.10
	REL8_0_12:1.8
	REL8_1_8:1.9
	REL8_2_3:1.10
	REL7_3_18:1.2
	REL7_4_16:1.7
	REL8_0_11:1.8
	REL8_1_7:1.9
	REL8_2_2:1.10
	REL8_0_10:1.8
	REL8_1_6:1.9
	REL8_2_1:1.10
	REL7_4_15:1.7
	REL7_3_17:1.2
	REL8_2_STABLE:1.10.0.2
	REL8_2_0:1.10
	REL8_2_RC1:1.10
	REL8_2_BETA3:1.10
	REL8_2_BETA2:1.10
	REL8_1_5:1.9
	REL8_0_9:1.8
	REL7_4_14:1.7
	REL7_3_16:1.2
	REL8_2_BETA1:1.10
	REL7_3_15:1.2
	REL7_4_13:1.7
	REL8_0_8:1.8
	REL8_1_4:1.9
	REL7_3_14:1.2
	REL7_4_12:1.7
	REL8_0_7:1.8
	REL8_1_3:1.9
	REL7_3_13:1.2
	REL7_4_11:1.7
	REL8_0_6:1.8
	REL8_1_2:1.9
	REL7_3_12:1.2
	REL7_4_10:1.7
	REL8_0_5:1.8
	REL8_1_1:1.9
	REL8_1_STABLE:1.9.0.2
	REL8_1_0:1.9
	REL8_1_0RC1:1.9
	REL8_1_0BETA4:1.9
	REL8_1_0BETA3:1.9
	REL7_3_11:1.2
	REL7_4_9:1.7
	REL8_0_4:1.8
	REL8_1_0BETA2:1.9
	REL8_1_0BETA1:1.9
	REL7_3_10:1.2
	REL7_4_8:1.7
	REL8_0_3:1.8
	REL8_0_2:1.8
	REL7_3_9:1.2
	REL7_4_7:1.7
	REL8_0_1:1.8
	REL8_0_STABLE:1.8.0.4
	REL8_0_0:1.8.0.2
	REL8_0_0RC5:1.8
	REL8_0_0RC4:1.8
	REL8_0_0RC3:1.8
	REL8_0_0RC2:1.8
	REL8_0_0RC1:1.8
	REL8_0_0BETA5:1.8
	REL8_0_0BETA4:1.8
	REL7_4_6:1.7
	REL7_3_8:1.2
	REL8_0_0BETA3:1.8
	REL8_0_0BETA2:1.8
	REL7_4_5:1.7
	REL7_3_7:1.2
	REL7_4_4:1.7
	REL8_0_0BETA1:1.8
	REL7_4_3:1.7
	REL7_4_2:1.7
	REL7_3_6:1.2
	REL7_4_1:1.7
	REL7_3_5:1.2
	REL7_4:1.7
	REL7_4_RC2:1.7
	REL7_4_STABLE:1.7.0.2
	REL7_4_RC1:1.7
	REL7_4_BETA5:1.7
	REL7_4_BETA4:1.7
	REL7_4_BETA3:1.6
	REL7_4_BETA2:1.4
	WIN32_DEV:1.4.0.2
	REL7_4_BETA1:1.4
	REL7_3_4:1.2
	REL7_3_2:1.2
	REL7_3_STABLE:1.2.0.2;
locks; strict;
comment	@# @;


1.13
date	2010.04.03.07.22.57;	author petere;	state Exp;
branches;
next	1.12;

1.12
date	2009.09.19.10.23.26;	author petere;	state Exp;
branches;
next	1.11;

1.11
date	2008.11.14.10.22.45;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2006.09.16.00.30.16;	author momjian;	state Exp;
branches;
next	1.9;

1.9
date	2005.08.24.17.24.19;	author tgl;	state Exp;
branches;
next	1.8;

1.8
date	2003.11.29.19.51.38;	author pgsql;	state Exp;
branches;
next	1.7;

1.7
date	2003.09.22.00.16.57;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	2003.09.09.18.28.52;	author tgl;	state Exp;
branches;
next	1.5;

1.5
date	2003.08.31.17.32.21;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2003.04.15.13.25.08;	author petere;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2002.11.23.03.59.06;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	2002.05.18.15.44.47;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2002.04.24.02.53.13;	author momjian;	state Exp;
branches;
next	;

1.4.2.1
date	2003.09.07.04.36.44;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.13
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_trigger.sgml,v 1.12 2009/09/19 10:23:26 petere Exp $
PostgreSQL documentation
-->

<refentry id="SQL-ALTERTRIGGER">
 <refmeta>
  <refentrytitle>ALTER TRIGGER</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>ALTER TRIGGER</refname>
  <refpurpose>change the definition of a trigger</refpurpose>
 </refnamediv>

 <indexterm zone="sql-altertrigger">
  <primary>ALTER TRIGGER</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
ALTER TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> RENAME TO <replaceable class="PARAMETER">new_name</replaceable>
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   <command>ALTER TRIGGER</command> changes properties of an existing
   trigger.  The <literal>RENAME</literal> clause changes the name of
   the given trigger without otherwise changing the trigger
   definition.
  </para>

  <para>
   You must own the table on which the trigger acts to be allowed to change its properties.
  </para>
 </refsect1>

 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
    <term><replaceable class="PARAMETER">name</replaceable></term>
    <listitem>
     <para>
      The name of an existing trigger to alter.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="PARAMETER">table</replaceable></term>
    <listitem>
     <para>
      The name of the table on which this trigger acts.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="PARAMETER">new_name</replaceable></term>
    <listitem>
     <para>
      The new name for the trigger.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Notes</title>

   <para>
    The ability to temporarily enable or disable a trigger is provided by
    <xref linkend="SQL-ALTERTABLE">, not by
    <command>ALTER TRIGGER</>, because <command>ALTER TRIGGER</> has no
    convenient way to express the option of enabling or disabling all of
    a table's triggers at once.
   </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   To rename an existing trigger:
<programlisting>
ALTER TRIGGER emp_stamp ON emp RENAME TO emp_track_chgs;
</programlisting>
  </para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   <command>ALTER TRIGGER</command> is a <productname>PostgreSQL</>
   extension of the SQL standard.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-altertable"></member>
  </simplelist>
 </refsect1>
</refentry>
@


1.12
log
@Make the placeholder naming in the synopses of the SQL help more consistent
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_trigger.sgml,v 1.11 2008/11/14 10:22:45 petere Exp $
d8 1
a8 1
  <refentrytitle id="sql-altertrigger-title">ALTER TRIGGER</refentrytitle>
d81 1
a81 1
    <xref linkend="SQL-ALTERTABLE" endterm="SQL-ALTERTABLE-TITLE">, not by
d112 1
a112 1
   <member><xref linkend="sql-altertable" endterm="sql-altertable-title"></member>
@


1.11
log
@Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_trigger.sgml,v 1.10 2006/09/16 00:30:16 momjian Exp $
d24 1
a24 1
ALTER TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> RENAME TO <replaceable class="PARAMETER">newname</replaceable>
d66 1
a66 1
    <term><replaceable class="PARAMETER">newname</replaceable></term>
@


1.10
log
@Remove emacs info from footer of SGML files.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_trigger.sgml,v 1.9 2005/08/24 17:24:19 tgl Exp $
d9 1
@


1.9
log
@Add documentation for ALTER TABLE ENABLE/DISABLE TRIGGER.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_trigger.sgml,v 1.8 2003/11/29 19:51:38 pgsql Exp $
a114 17

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
@


1.8
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d2 1
a2 1
$PostgreSQL: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_trigger.sgml,v 1.7 2003/09/22 00:16:57 petere Exp $
d76 12
d106 8
@


1.7
log
@Make the SQL command synopses appear less random.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_trigger.sgml,v 1.6 2003/09/09 18:28:52 tgl Exp $
@


1.6
log
@Remove a bunch of content-free Diagnostics sections, as per previous
discussion.  (Still have some work to do editing the remainder.)
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_trigger.sgml,v 1.5 2003/08/31 17:32:21 petere Exp $
d23 1
a23 2
ALTER TRIGGER <replaceable class="PARAMETER">trigger</replaceable> ON <replaceable class="PARAMETER">table</replaceable>
    RENAME TO <replaceable class="PARAMETER">newname</replaceable>
d47 1
a47 1
    <term><replaceable class="PARAMETER">trigger</replaceable></term>
@


1.5
log
@Add/edit index entries.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_trigger.sgml,v 1.4 2003/04/15 13:25:08 petere Exp $
d44 1
a44 1
  <title>Parameter</title>
a69 25
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Diagnostics</title>

  <variablelist>
   <varlistentry>
    <term><computeroutput>ALTER TRIGGER</computeroutput></term>
    <listitem>
     <para>
      Message returned if successful.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><computeroutput>ERROR</computeroutput></term>
    <listitem>
     <para>
      If the trigger does not exist, or the new name is a duplicate of
      another existing trigger on the table.
@


1.4
log
@Bring SQL ref pages to consistent format, part 1.
@
text
@d2 1
a2 1
$Header$
d16 4
@


1.4.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/alter_trigger.sgml,v 1.5 2003/08/31 17:32:21 petere Exp $
a15 4

 <indexterm zone="sql-altertrigger">
  <primary>ALTER TRIGGER</primary>
 </indexterm>
@


1.3
log
@This patch implements FOR EACH STATEMENT triggers, per my email to
-hackers a couple days ago.

Notes/caveats:

        - added regression tests for the new functionality, all
          regression tests pass on my machine

        - added pg_dump support

        - updated PL/PgSQL to support per-statement triggers; didn't
          look at the other procedural languages.

        - there's (even) more code duplication in trigger.c than there
          was previously. Any suggestions on how to refactor the
          ExecXXXTriggers() functions to reuse more code would be
          welcome -- I took a brief look at it, but couldn't see an
          easy way to do it (there are several subtly-different
          versions of the code in question)

        - updated the documentation. I also took the liberty of
          removing a big chunk of duplicated syntax documentation in
          the Programmer's Guide on triggers, and moving that
          information to the CREATE TRIGGER reference page.

        - I also included some spelling fixes and similar small
          cleanups I noticed while making the changes. If you'd like
          me to split those into a separate patch, let me know.

Neil Conway
@
text
@d2 1
d8 1
a8 3
  <refentrytitle id="sql-altertrigger-title">
   ALTER TRIGGER
  </refentrytitle>
d11 1
d13 2
a14 6
  <refname>
   ALTER TRIGGER
  </refname>
  <refpurpose>
   change the definition of a trigger
  </refpurpose>
d16 1
d18 1
a18 4
  <refsynopsisdivinfo>
   <date>2002-04-19</date>
  </refsynopsisdivinfo>
  <synopsis>
d21 2
a22 1
  </synopsis>
d24 2
a25 72
  <refsect2 id="R2-SQL-ALTERTRIGGER-1">
   <refsect2info>
    <date>2002-04-19</date>
   </refsect2info>
   <title>
    Inputs
   </title>
   <para>
    <variablelist>

     <varlistentry>
      <term><replaceable class="PARAMETER"> trigger </replaceable></term>
      <listitem>
       <para>
	The name of an existing trigger to alter.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><replaceable class="PARAMETER"> table </replaceable></term>
      <listitem>
       <para>
	The name of the table on which this trigger acts.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><replaceable class="PARAMETER"> newname </replaceable></term>
      <listitem>
       <para>
	New name for the existing trigger.
       </para>
      </listitem>
     </varlistentry>

    </variablelist>
   </para>
  </refsect2>

  <refsect2 id="R2-SQL-ALTERTRIGGER-2">
   <refsect2info>
    <date>2002-04-19</date>
   </refsect2info>
   <title>
    Outputs
   </title>
   <para>

    <variablelist>
     <varlistentry>
      <term><computeroutput>ALTER TRIGGER</computeroutput></term>
      <listitem>
       <para>
	Message returned from trigger renaming.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><computeroutput>ERROR</computeroutput></term>
      <listitem>
       <para>
	Message returned if trigger is not available, or new name is a duplicate of another existing trigger on the table.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </refsect2>
 </refsynopsisdiv>
a26 7
 <refsect1 id="R1-SQL-ALTERTRIGGER-1">
  <refsect1info>
   <date>2002-04-19</date>
  </refsect1info>
  <title>
   Description
  </title>
d28 4
a31 3
   <command>ALTER TRIGGER</command> changes the definition of an existing trigger.
   The <literal>RENAME</literal> clause causes the name of a trigger on the given table
   to change without otherwise changing the trigger definition.
d35 1
a35 1
   You must own the table on which the trigger acts in order to change its properties.
d37 4
d42 28
a69 12
  <refsect2 id="R2-SQL-ALTERTRIGGER-3">
   <refsect2info>
    <date>2002-04-19</date>
   </refsect2info>
   <title>
    Notes
   </title>
   <para>
    Refer to <command>CREATE TRIGGER</command> for a further description
    of valid arguments.
   </para>
  </refsect2>
d72 28
a99 4
 <refsect1 id="R1-SQL-ALTERTRIGGER-2">
  <title>
   Usage
  </title>
d102 1
a102 1
   <programlisting>
d104 1
a104 1
   </programlisting>
d108 7
a114 15
 <refsect1 id="R1-SQL-ALTERTRIGGER-3">
  <title>
   Compatibility
  </title>

  <refsect2 id="R2-SQL-ALTERTRIGGER-4">
   <refsect2info>
    <date>2002-04-19</date>
   </refsect2info>
   <title>SQL92</title>
   <para>
    <command>ALTER TRIGGER</command> is a <productname>PostgreSQL</>
    extension of SQL92.
   </para>
  </refsect2>
@


1.2
log
@Revise command completion tags as per hackers message on 20 March.
@
text
@d156 2
a157 2
    The clause to rename triggers is a
    <productname>PostgreSQL</productname> extension from SQL92.
@


1.1
log
@Add missing SGML file.
@
text
@d81 1
a81 1
      <term><computeroutput>ALTER</computeroutput></term>
@
