Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
[PostgreSQL.git] / doc / src / sgml / ref / drop_operator.sgml
blob068b51a52d882f4f70ddfcaab0c33f0c4a766fbc
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-DROPOPERATOR">
7 <refmeta>
8 <refentrytitle id="SQL-DROPOPERATOR-TITLE">DROP OPERATOR</refentrytitle>
9 <refmiscinfo>SQL - Language Statements</refmiscinfo>
10 </refmeta>
12 <refnamediv>
13 <refname>DROP OPERATOR</refname>
14 <refpurpose>remove an operator</refpurpose>
15 </refnamediv>
17 <indexterm zone="sql-dropoperator">
18 <primary>DROP OPERATOR</primary>
19 </indexterm>
21 <refsynopsisdiv>
22 <synopsis>
23 DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">lefttype</replaceable> | NONE } , { <replaceable class="PARAMETER">righttype</replaceable> | NONE } ) [ CASCADE | RESTRICT ]
24 </synopsis>
25 </refsynopsisdiv>
27 <refsect1>
28 <title>Description</title>
30 <para>
31 <command>DROP OPERATOR</command> drops an existing operator from
32 the database system. To execute this command you must be the owner
33 of the operator.
34 </para>
35 </refsect1>
37 <refsect1>
38 <title>Parameters</title>
40 <variablelist>
42 <varlistentry>
43 <term><literal>IF EXISTS</literal></term>
44 <listitem>
45 <para>
46 Do not throw an error if the operator does not exist. A notice is issued
47 in this case.
48 </para>
49 </listitem>
50 </varlistentry>
52 <varlistentry>
53 <term><replaceable class="parameter">name</replaceable></term>
54 <listitem>
55 <para>
56 The name (optionally schema-qualified) of an existing operator.
57 </para>
58 </listitem>
59 </varlistentry>
61 <varlistentry>
62 <term><replaceable class="parameter">lefttype</replaceable></term>
63 <listitem>
64 <para>
65 The data type of the operator's left operand; write
66 <literal>NONE</literal> if the operator has no left operand.
67 </para>
68 </listitem>
69 </varlistentry>
71 <varlistentry>
72 <term><replaceable class="parameter">righttype</replaceable></term>
73 <listitem>
74 <para>
75 The data type of the operator's right operand; write
76 <literal>NONE</literal> if the operator has no right operand.
77 </para>
78 </listitem>
79 </varlistentry>
81 <varlistentry>
82 <term><literal>CASCADE</literal></term>
83 <listitem>
84 <para>
85 Automatically drop objects that depend on the operator.
86 </para>
87 </listitem>
88 </varlistentry>
90 <varlistentry>
91 <term><literal>RESTRICT</literal></term>
92 <listitem>
93 <para>
94 Refuse to drop the operator if any objects depend on it. This
95 is the default.
96 </para>
97 </listitem>
98 </varlistentry>
99 </variablelist>
100 </refsect1>
102 <refsect1>
103 <title>Examples</title>
105 <para>
106 Remove the power operator <literal>a^b</literal> for type <type>integer</type>:
107 <programlisting>
108 DROP OPERATOR ^ (integer, integer);
109 </programlisting>
110 </para>
112 <para>
113 Remove the left unary bitwise complement operator
114 <literal>~b</literal> for type <type>bit</type>:
115 <programlisting>
116 DROP OPERATOR ~ (none, bit);
117 </programlisting>
118 </para>
120 <para>
121 Remove the right unary factorial operator <literal>x!</literal>
122 for type <type>bigint</type>:
123 <programlisting>
124 DROP OPERATOR ! (bigint, none);
125 </programlisting>
126 </para>
127 </refsect1>
129 <refsect1>
130 <title>Compatibility</title>
132 <para>
133 There is no <command>DROP OPERATOR</command> statement in the SQL standard.
134 </para>
135 </refsect1>
137 <refsect1>
138 <title>See Also</title>
140 <simplelist type="inline">
141 <member><xref linkend="sql-createoperator" endterm="sql-createoperator-title"></member>
142 <member><xref linkend="sql-alteroperator" endterm="sql-alteroperator-title"></member>
143 </simplelist>
144 </refsect1>
146 </refentry>