2 doc/src/sgml/ref/alter_rule.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-ALTERRULE">
8 <refentrytitle>ALTER RULE</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
14 <refname>ALTER RULE</refname>
15 <refpurpose>change the definition of a rule</refpurpose>
18 <indexterm zone="sql-alterrule">
19 <primary>ALTER RULE</primary>
24 ALTER RULE <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> RENAME TO <replaceable class="PARAMETER">new_name</replaceable>
29 <title>Description</title>
32 <command>ALTER RULE</command> changes properties of an existing
33 rule. Currently, the only available action is to change the rule's name.
37 To use <command>ALTER RULE</command>, you must own the table or view that
43 <title>Parameters</title>
47 <term><replaceable class="PARAMETER">name</replaceable></term>
50 The name of an existing rule to alter.
56 <term><replaceable class="PARAMETER">table_name</replaceable></term>
59 The name (optionally schema-qualified) of the table or view that the
66 <term><replaceable class="PARAMETER">new_name</replaceable></term>
69 The new name for the rule.
77 <title>Examples</title>
80 To rename an existing rule:
82 ALTER RULE notify_all ON emp RENAME TO notify_me;
83 </programlisting></para>
87 <title>Compatibility</title>
90 <command>ALTER RULE</command> is a
91 <productname>PostgreSQL</productname> language extension, as is the
92 entire query rewrite system.
97 <title>See Also</title>
99 <simplelist type="inline">
100 <member><xref linkend="sql-createrule"></member>
101 <member><xref linkend="sql-droprule"></member>