3 PostgreSQL documentation
6 <refentry id=
"SQL-DROPRULE">
8 <refentrytitle id=
"SQL-DROPRULE-TITLE">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">relation
</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">relation
</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;
104 <title>Compatibility
</title>
107 There is no
<command>DROP RULE
</command> statement in the SQL standard.
112 <title>See Also
</title>
114 <simplelist type=
"inline">
115 <member><xref linkend=
"sql-createrule" endterm=
"sql-createrule-title"></member>