<!--
$Header: /home/postgres/cvs_root/pgsql-r-v7.2/doc/src/sgml/ref/drop_rule.sgml,v 1.1.1.1 2002/02/07 17:50:40 bpalmer Exp $
PostgreSQL documentation
-->

<refentry id="SQL-DROPRULE">
 <refmeta>
  <refentrytitle id="SQL-DROPRULE-TITLE">
   DROP RULE
  </refentrytitle>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>
 <refnamediv>
  <refname>
   DROP RULE
  </refname>
  <refpurpose>
   remove a rewrite rule
  </refpurpose>
 </refnamediv>
 <refsynopsisdiv>
  <refsynopsisdivinfo>
   <date>1998-09-22</date>
  </refsynopsisdivinfo>
  <synopsis>
DROP RULE <replaceable class="PARAMETER">name</replaceable> [, ...]
  </synopsis>
  
  <refsect2 id="R2-SQL-DROPRULE-1">
   <refsect2info>
    <date>1998-09-22</date>
   </refsect2info>
   <title>
    Inputs
   </title>
   <para>
    <variablelist>
     <varlistentry>
      <term><replaceable class="parameter">name</replaceable></term>
      <listitem>
       <para>
	The name of an existing rule to drop.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </refsect2>

  <refsect2 id="R2-SQL-DROPRULE-2">
   <refsect2info>
    <date>1998-09-22</date>
   </refsect2info>
   <title>
    Outputs
   </title>
   <para>
    <variablelist>
     <varlistentry>
      <term><computeroutput>
DROP
       </computeroutput></term>
      <listitem>
       <para>
	Message returned if successful.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><computeroutput>
ERROR:  Rule or view "<replaceable class="parameter">name</replaceable>" not found
       </computeroutput></term>
      <listitem>
       <para>
	This message occurs if the specified rule does not exist.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </refsect2>
 </refsynopsisdiv>

 <refsect1 id="R1-SQL-DROPRULE-1">
  <refsect1info>
   <date>1998-09-22</date>
  </refsect1info>
  <title>
   Description
  </title>
  <para>
   <command>DROP RULE</command> drops a rule from the specified
   <productname>PostgreSQL</productname> rule
   system. <productname>PostgreSQL</productname>
   will immediately cease enforcing it and
   will purge its definition from the system catalogs.
  </para>

  <refsect2 id="R2-SQL-DROPRULE-3">
   <refsect2info>
    <date>1998-09-22</date>
   </refsect2info>
   <title>
    Notes
   </title>
   <para>
    The <command>DROP RULE</command> statement is a
    <productname>PostgreSQL</productname>
    language extension.
   </para>

   <para>
    Refer to <command>CREATE RULE</command> for
    information on how to create rules.
   </para>

   <para>
    Once a rule is dropped, access to historical information
    the rule has written may disappear.
   </para>
  </refsect2>
 </refsect1>
  
 <refsect1 id="R1-SQL-DROPRULE-2">
  <title>
   Usage
  </title>
  <para>
   To drop the rewrite rule <literal>newrule</literal>:

   <programlisting>
DROP RULE newrule;
   </programlisting>
  </para>
 </refsect1>
 
 <refsect1 id="R1-SQL-DROPRULE-3">
  <title>
   Compatibility
  </title>

  <refsect2 id="R2-SQL-DROPRULE-5">
   <refsect2info>
    <date>1998-09-22</date>
   </refsect2info>
   <title>
    SQL92
   </title>
   <para>
    There is no <command>DROP RULE</command> in SQL92.
   </para>
  </refsect2>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
