4
4
<title>DROP RULE</title>
5
5
<link rel="stylesheet" href="stylesheet.css" type="text/css">
6
6
<link rev="made" href="pgsql-docs@postgresql.org">
7
<meta name="generator" content="DocBook XSL Stylesheets V1.64.1">
8
<link rel="home" href="index.html" title="PostgreSQL 8.0.0beta5 Documentation">
7
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
8
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
9
9
<link rel="up" href="sql-commands.html" title="SQL Commands">
10
<link rel="previous" href="sql-dropopclass.html" title="DROP OPERATOR CLASS">
10
<link rel="prev" href="sql-droprole.html" title="DROP ROLE">
11
11
<link rel="next" href="sql-dropschema.html" title="DROP SCHEMA">
12
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
13
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
14
<a name="sql-droprule"></a><div class="titlepage">
15
<a name="sql-droprule"></a><div class="titlepage"></div>
18
16
<div class="refnamediv">
20
18
<p>DROP RULE — remove a rewrite rule</p>
22
<a name="id2684974"></a><div class="refsynopsisdiv">
20
<a name="id772159"></a><div class="refsynopsisdiv">
24
<pre class="synopsis">DROP RULE <i class="replaceable"><tt>name</tt></i> ON <i class="replaceable"><tt>relation</tt></i> [ CASCADE | RESTRICT ]</pre>
22
<pre class="synopsis">DROP RULE <em class="replaceable"><code>name</code></em> ON <em class="replaceable"><code>relation</code></em> [ CASCADE | RESTRICT ]</pre>
26
24
<div class="refsect1" lang="en">
27
<a name="id2685002"></a><h2>Description</h2>
28
<p> <tt class="command">DROP RULE</tt> drops a rewrite rule.
25
<a name="id772190"></a><h2>Description</h2>
26
<p> <code class="command">DROP RULE</code> drops a rewrite rule.
31
29
<div class="refsect1" lang="en">
32
<a name="id2685014"></a><h2>Parameters</h2>
30
<a name="id772204"></a><h2>Parameters</h2>
33
31
<div class="variablelist"><dl>
34
<dt><span class="term"><i class="replaceable"><tt>name</tt></i></span></dt>
32
<dt><span class="term"><em class="replaceable"><code>name</code></em></span></dt>
35
33
<dd><p> The name of the rule to drop.
37
<dt><span class="term"><i class="replaceable"><tt>relation</tt></i></span></dt>
35
<dt><span class="term"><em class="replaceable"><code>relation</code></em></span></dt>
38
36
<dd><p> The name (optionally schema-qualified) of the table or view that
39
37
the rule applies to.
41
<dt><span class="term"><tt class="literal">CASCADE</tt></span></dt>
39
<dt><span class="term"><code class="literal">CASCADE</code></span></dt>
42
40
<dd><p> Automatically drop objects that depend on the rule.
44
<dt><span class="term"><tt class="literal">RESTRICT</tt></span></dt>
42
<dt><span class="term"><code class="literal">RESTRICT</code></span></dt>
45
43
<dd><p> Refuse to drop the rule if any objects depend on it. This is
50
48
<div class="refsect1" lang="en">
51
<a name="id2685064"></a><h2>Examples</h2>
52
<p> To drop the rewrite rule <tt class="literal">newrule</tt>:
49
<a name="id772260"></a><h2>Examples</h2>
50
<p> To drop the rewrite rule <code class="literal">newrule</code>:
55
53
<pre class="programlisting">DROP RULE newrule ON mytable;</pre>
59
57
<div class="refsect1" lang="en">
60
<a name="id2685082"></a><h2>Compatibility</h2>
61
<p> There is no <tt class="command">DROP RULE</tt> statement in the SQL standard.
58
<a name="id772280"></a><h2>Compatibility</h2>
59
<p> There is no <code class="command">DROP RULE</code> statement in the SQL standard.
64
62
<div class="refsect1" lang="en">
65
<a name="id2685095"></a><h2>See Also</h2>
63
<a name="id772294"></a><h2>See Also</h2>
66
64
<span class="simplelist"><a href="sql-createrule.html">CREATE RULE</a></span>