]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_operator.sgml
Last round of reference page editing.
[postgresql] / doc / src / sgml / ref / drop_operator.sgml
1 <!--
2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.19 2003/05/04 02:23:16 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
12  <refnamediv>
13   <refname>DROP OPERATOR</refname>
14   <refpurpose>remove a user-defined operator</refpurpose>
15  </refnamediv>
16   
17  <refsynopsisdiv>
18 <synopsis>
19 DROP OPERATOR <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">lefttype</replaceable> | NONE , <replaceable class="PARAMETER">righttype</replaceable> | NONE ) [ CASCADE | RESTRICT ]
20 </synopsis>
21  </refsynopsisdiv>
22
23  <refsect1>
24   <title>Description</title>
25
26   <para>
27    <command>DROP OPERATOR</command> drops an existing operator from
28    the database system.  To execute this command you must be the owner
29    of the operator.
30   </para>
31  </refsect1>
32   
33  <refsect1>
34   <title>Parameters</title>
35
36   <variablelist>
37    <varlistentry>
38     <term><replaceable class="parameter">name</replaceable></term>
39     <listitem>
40      <para>
41       The name (optionally schema-qualified) of an existing operator.
42      </para>
43     </listitem>
44    </varlistentry>
45
46    <varlistentry>
47     <term><replaceable class="parameter">lefttype</replaceable></term>
48     <listitem>
49      <para>
50       The data type of the operator's left operand; write
51       <literal>NONE</literal> if the operator has no left operand.
52      </para>
53     </listitem>
54    </varlistentry>
55
56    <varlistentry>
57     <term><replaceable class="parameter">righttype</replaceable></term>
58     <listitem>
59      <para>
60       The data type of the operator's right operand; write
61       <literal>NONE</literal> if the operator has no right operand.
62      </para>
63     </listitem>
64    </varlistentry>
65
66    <varlistentry>
67     <term><literal>CASCADE</literal></term>
68     <listitem>
69      <para>
70       Automatically drop objects that depend on the operator.
71      </para>
72     </listitem>
73    </varlistentry>
74
75    <varlistentry>
76     <term><literal>RESTRICT</literal></term>
77     <listitem>
78      <para>
79       Refuse to drop the operator if any objects depend on it.  This
80       is the default.
81      </para>
82     </listitem>
83    </varlistentry>
84   </variablelist>
85  </refsect1>
86
87  <refsect1>
88   <title>Diagnostics</title>
89
90   <variablelist>
91    <varlistentry>
92     <term><computeroutput>DROP OPERATOR</computeroutput></term>
93     <listitem>
94      <para>
95       Message returned if the command was successful.
96      </para>
97     </listitem>
98    </varlistentry>
99
100    <varlistentry>
101     <term><computeroutput>ERROR:  RemoveOperator: binary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' and '<replaceable class="PARAMETER">righttype</replaceable>' does not exist</computeroutput></term>
102     <listitem>
103      <para>
104       This message is returned if the specified binary operator does not exist.
105      </para>
106     </listitem>
107    </varlistentry>
108
109    <varlistentry>
110     <term><computeroutput>ERROR: RemoveOperator: left unary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' does not exist</computeroutput></term>
111     <listitem>
112      <para>
113       This message is returned if the specified left unary operator
114       does not exist.
115      </para>
116     </listitem>
117    </varlistentry>
118
119    <varlistentry>
120     <term><computeroutput>ERROR: RemoveOperator: right unary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">righttype</replaceable>' does not exist</computeroutput></term>
121     <listitem>
122      <para>
123       This message is returned if the specified right unary operator
124       does not exist.
125      </para>
126     </listitem>
127    </varlistentry>
128   </variablelist>
129  </refsect1>
130
131  <refsect1>
132   <title>Examples</title>
133
134   <para>
135    Remove the power operator <literal>a^b</literal> for type <type>integer</type>:
136 <programlisting>
137 DROP OPERATOR ^ (integer, integer);
138 </programlisting>
139   </para>
140
141   <para>
142    Remove the left unary bitwise complement operator
143    <literal>~b</literal> for type <type>bit</type>:
144 <programlisting>
145 DROP OPERATOR ~ (none, bit);
146 </programlisting>
147   </para>
148
149   <para>
150    Remove the right unary factorial operator <literal>x!</literal>
151    for type <type>integer</type>:
152 <programlisting>
153 DROP OPERATOR ! (integer, none);
154 </programlisting>
155   </para>
156  </refsect1>
157  
158  <refsect1>
159   <title>Compatibility</title>
160
161   <para>
162    There is no <command>DROP OPERATOR</command> statement in the SQL standard.
163   </para>
164  </refsect1>
165
166  <refsect1>
167   <title>See Also</title>
168
169   <simplelist type="inline">
170    <member><xref linkend="sql-createoperator" endterm="sql-createoperator-title"></member>
171   </simplelist>
172  </refsect1>
173
174 </refentry>
175
176 <!-- Keep this comment at the end of the file
177 Local variables:
178 mode: sgml
179 sgml-omittag:nil
180 sgml-shorttag:t
181 sgml-minimize-attributes:nil
182 sgml-always-quote-attributes:t
183 sgml-indent-step:1
184 sgml-indent-data:t
185 sgml-parent-document:nil
186 sgml-default-dtd-file:"../reference.ced"
187 sgml-exposed-tags:nil
188 sgml-local-catalogs:"/usr/lib/sgml/catalog"
189 sgml-local-ecat-files:nil
190 End:
191 -->