]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_operator.sgml
Add proofreader's changes to docs.
[postgresql] / doc / src / sgml / ref / drop_operator.sgml
1 <!--
2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.7 2000/10/05 19:48:18 momjian Exp $
3 Postgres documentation
4 -->
5
6 <refentry id="SQL-DROPOPERATOR">
7  <refmeta>
8   <refentrytitle id="SQL-DROPOPERATOR-TITLE">
9    DROP OPERATOR
10   </refentrytitle>
11   <refmiscinfo>SQL - Language Statements</refmiscinfo>
12  </refmeta>
13  <refnamediv>
14   <refname>
15    DROP OPERATOR
16   </refname>
17   <refpurpose>
18    Removes an operator from the database
19   </refpurpose>
20  </refnamediv>
21   
22  <refsynopsisdiv>
23   <refsynopsisdivinfo>
24    <date>1999-07-20</date>
25   </refsynopsisdivinfo>
26   <synopsis>
27 DROP OPERATOR <replaceable class="PARAMETER">id</replaceable> ( <replaceable class="PARAMETER">type</replaceable> | NONE [,...] )
28   </synopsis>
29   
30   <refsect2 id="R2-SQL-DROPOPERATOR-1">
31    <refsect2info>
32     <date>1998-09-22</date>
33    </refsect2info>
34    <title>
35     Inputs
36    </title>
37    <para>
38     <variablelist>
39      <varlistentry>
40       <term><replaceable class="parameter">id</replaceable></term>
41       <listitem>
42        <para>
43         The identifier of an existing operator.
44        </para>
45       </listitem>
46      </varlistentry>
47      <varlistentry>
48       <term><replaceable class="parameter">type</replaceable></term>
49       <listitem>
50        <para>
51         The type of function parameters.
52        </para>
53       </listitem>
54      </varlistentry>
55     </variablelist>
56    </para>
57   </refsect2>
58
59   <refsect2 id="R2-SQL-DROPOPERATOR-2">
60    <refsect2info>
61     <date>1998-09-22</date>
62    </refsect2info>
63    <title>
64     Outputs
65    </title>
66    <para>
67
68     <variablelist>
69      <varlistentry>
70       <term><computeroutput>
71 DROP
72        </computeroutput></term>
73       <listitem>
74        <para>
75         The message returned if the command is successful.
76        </para>
77       </listitem>
78      </varlistentry>
79      <varlistentry>
80       <term><computeroutput>
81 ERROR:  RemoveOperator: binary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">type</replaceable>' and '<replaceable class="PARAMETER">type2</replaceable>' does not exist
82        </computeroutput></term>
83       <listitem>
84        <para>
85         This message occurs if the specified binary operator does not exist.
86        </para>
87       </listitem>
88      </varlistentry>
89      <varlistentry>
90       <term><computeroutput>
91 ERROR:  RemoveOperator: left unary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">type</replaceable>' does not exist
92        </computeroutput></term>
93       <listitem>
94        <para>
95         This message occurs if the left unary operator
96         specified does not exist.
97        </para>
98       </listitem>
99      </varlistentry>
100      <varlistentry>
101       <term><computeroutput>
102 ERROR:  RemoveOperator: right unary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">type</replaceable>' does not exist
103        </computeroutput></term>
104       <listitem>
105        <para>
106         This message occurs if the right unary operator
107         specified does not exist.
108        </para>
109       </listitem>
110      </varlistentry>
111     </variablelist>
112    </para>
113   </refsect2>
114  </refsynopsisdiv>
115
116  <refsect1 id="R1-SQL-DROPOPERATOR-1">
117   <refsect1info>
118    <date>1998-09-22</date>
119   </refsect1info>
120   <title>
121    Description
122   </title>
123   <para>
124    <command>DROP OPERATOR</command> drops an existing operator from the
125    database.
126    To execute this command you must be the owner of the operator.
127   </para>
128   <para>
129    The left or right type of a left or right unary
130    operator, respectively, may be specified as <literal>NONE</literal>.
131   </para>
132
133   <refsect2 id="R2-SQL-DROPOPERATOR-3">
134    <refsect2info>
135     <date>1998-09-22</date>
136    </refsect2info>
137    <title>
138     Notes
139    </title>
140    <para>
141     The <command>DROP OPERATOR</command> statement is a 
142     <productname>Postgres</productname>
143     language extension.
144    </para>
145    <para>
146     Refer to
147     <xref linkend="sql-createoperator-title" endterm="sql-createoperator-title">
148     for information on how to create operators.
149    </para>
150    <para>
151     It is the user's responsibility to remove any access methods and
152     operator classes that rely on the deleted operator.
153    </para>
154   </refsect2>
155  </refsect1>
156
157  <refsect1 id="R1-SQL-DROPOPERATOR-2">
158   <title>
159    Usage
160   </title>
161   <para>
162    Remove power operator <literal>a^n</literal> for <literal>int4</literal>:
163
164    <programlisting>
165 DROP OPERATOR ^ (int4, int4);
166    </programlisting>
167   </para>
168   <para>
169    Remove left unary negation operator (<literal>b !</literal>) for booleans:
170    <programlisting>
171 DROP OPERATOR ! (none, bool);
172    </programlisting>
173   </para>
174   <para>
175    Remove right unary factorial operator (<literal>! i</literal>) for
176    <literal>int4</literal>:
177    <programlisting>
178 DROP OPERATOR ! (int4, none);
179    </programlisting>
180   </para>
181  </refsect1>
182  
183  <refsect1 id="R1-SQL-DROPOPERATOR-3">
184   <title>
185    Compatibility
186   </title>
187
188   <refsect2 id="R2-SQL-DROPOPERATOR-4">
189    <refsect2info>
190     <date>1998-09-22</date>
191    </refsect2info>
192    <title>
193     SQL92
194    </title>
195    <para>
196     There is no <command>DROP OPERATOR</command> in <acronym>SQL92</acronym>.
197    </para>
198   </refsect2>
199  </refsect1>
200 </refentry>
201
202 <!-- Keep this comment at the end of the file
203 Local variables:
204 mode: sgml
205 sgml-omittag:nil
206 sgml-shorttag:t
207 sgml-minimize-attributes:nil
208 sgml-always-quote-attributes:t
209 sgml-indent-step:1
210 sgml-indent-data:t
211 sgml-parent-document:nil
212 sgml-default-dtd-file:"../reference.ced"
213 sgml-exposed-tags:nil
214 sgml-local-catalogs:"/usr/lib/sgml/catalog"
215 sgml-local-ecat-files:nil
216 End:
217 -->