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