2 doc/src/sgml/ref/drop_rule.sgml
3 PostgreSQL documentation
6 <refentry id="SQL-DROPRULE">
8 <refentrytitle>DROP RULE</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements</refmiscinfo>
14 <refname>DROP RULE</refname>
15 <refpurpose>remove a rewrite rule</refpurpose>
18 <indexterm zone="sql-droprule">
19 <primary>DROP RULE</primary>
24 DROP RULE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> [ CASCADE | RESTRICT ]
29 <title>Description</title>
32 <command>DROP RULE</command> drops a rewrite rule.
37 <title>Parameters</title>
42 <term><literal>IF EXISTS</literal></term>
45 Do not throw an error if the rule does not exist. A notice is issued
52 <term><replaceable class="parameter">name</replaceable></term>
55 The name of the rule to drop.
61 <term><replaceable class="parameter">table</replaceable></term>
64 The name (optionally schema-qualified) of the table or view that
71 <term><literal>CASCADE</literal></term>
74 Automatically drop objects that depend on the rule.
80 <term><literal>RESTRICT</literal></term>
83 Refuse to drop the rule if any objects depend on it. This is
92 <title>Examples</title>
95 To drop the rewrite rule <literal>newrule</literal>:
98 DROP RULE newrule ON mytable;
99 </programlisting></para>
103 <title>Compatibility</title>
106 There is no <command>DROP RULE</command> statement in the SQL standard.
111 <title>See Also</title>
113 <simplelist type="inline">
114 <member><xref linkend="sql-createrule"></member>