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