]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_rule.sgml
Fix psql doc typo.
[postgresql] / doc / src / sgml / ref / drop_rule.sgml
1 <!--
2 doc/src/sgml/ref/drop_rule.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPRULE">
7  <refmeta>
8   <refentrytitle>DROP RULE</refentrytitle>
9   <manvolnum>7</manvolnum>
10   <refmiscinfo>SQL - Language Statements</refmiscinfo>
11  </refmeta>
12
13  <refnamediv>
14   <refname>DROP RULE</refname>
15   <refpurpose>remove a rewrite rule</refpurpose>
16  </refnamediv>
17
18  <indexterm zone="sql-droprule">
19   <primary>DROP RULE</primary>
20  </indexterm>
21
22  <refsynopsisdiv>
23 <synopsis>
24 DROP RULE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> [ CASCADE | RESTRICT ]
25 </synopsis>
26  </refsynopsisdiv>
27
28  <refsect1>
29   <title>Description</title>
30
31   <para>
32    <command>DROP RULE</command> drops a rewrite rule.
33   </para>
34  </refsect1>
35
36  <refsect1>
37   <title>Parameters</title>
38
39   <variablelist>
40
41    <varlistentry>
42     <term><literal>IF EXISTS</literal></term>
43     <listitem>
44      <para>
45       Do not throw an error if the rule does not exist. A notice is issued
46       in this case.
47      </para>
48     </listitem>
49    </varlistentry>
50
51    <varlistentry>
52     <term><replaceable class="parameter">name</replaceable></term>
53     <listitem>
54      <para>
55       The name of the rule to drop.
56      </para>
57     </listitem>
58    </varlistentry>
59
60    <varlistentry>
61     <term><replaceable class="parameter">table</replaceable></term>
62     <listitem>
63      <para>
64       The name (optionally schema-qualified) of the table or view that
65       the rule applies to.
66      </para>
67     </listitem>
68    </varlistentry>
69
70    <varlistentry>
71     <term><literal>CASCADE</literal></term>
72     <listitem>
73      <para>
74       Automatically drop objects that depend on the rule.
75      </para>
76     </listitem>
77    </varlistentry>
78
79    <varlistentry>
80     <term><literal>RESTRICT</literal></term>
81     <listitem>
82      <para>
83       Refuse to drop the rule if any objects depend on it.  This is
84       the default.
85      </para>
86     </listitem>
87    </varlistentry>
88   </variablelist>
89  </refsect1>
90
91  <refsect1>
92   <title>Examples</title>
93
94   <para>
95    To drop the rewrite rule <literal>newrule</literal>:
96
97 <programlisting>
98 DROP RULE newrule ON mytable;
99 </programlisting></para>
100  </refsect1>
101
102  <refsect1>
103   <title>Compatibility</title>
104
105   <para>
106    There is no <command>DROP RULE</command> statement in the SQL standard.
107   </para>
108  </refsect1>
109
110  <refsect1>
111   <title>See Also</title>
112
113   <simplelist type="inline">
114    <member><xref linkend="sql-createrule"></member>
115   </simplelist>
116  </refsect1>
117
118 </refentry>