3 PostgreSQL documentation
6 <refentry id=
"SQL-DROPOPERATOR">
8 <refentrytitle id=
"SQL-DROPOPERATOR-TITLE">DROP OPERATOR
</refentrytitle>
9 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
13 <refname>DROP OPERATOR
</refname>
14 <refpurpose>remove an operator
</refpurpose>
17 <indexterm zone=
"sql-dropoperator">
18 <primary>DROP OPERATOR
</primary>
23 DROP OPERATOR [ IF EXISTS ]
<replaceable class=
"PARAMETER">name
</replaceable> ( {
<replaceable class=
"PARAMETER">lefttype
</replaceable> | NONE } , {
<replaceable class=
"PARAMETER">righttype
</replaceable> | NONE } ) [ CASCADE | RESTRICT ]
28 <title>Description
</title>
31 <command>DROP OPERATOR
</command> drops an existing operator from
32 the database system. To execute this command you must be the owner
38 <title>Parameters
</title>
43 <term><literal>IF EXISTS
</literal></term>
46 Do not throw an error if the operator does not exist. A notice is issued
53 <term><replaceable class=
"parameter">name
</replaceable></term>
56 The name (optionally schema-qualified) of an existing operator.
62 <term><replaceable class=
"parameter">lefttype
</replaceable></term>
65 The data type of the operator's left operand; write
66 <literal>NONE
</literal> if the operator has no left operand.
72 <term><replaceable class=
"parameter">righttype
</replaceable></term>
75 The data type of the operator's right operand; write
76 <literal>NONE
</literal> if the operator has no right operand.
82 <term><literal>CASCADE
</literal></term>
85 Automatically drop objects that depend on the operator.
91 <term><literal>RESTRICT
</literal></term>
94 Refuse to drop the operator if any objects depend on it. This
103 <title>Examples
</title>
106 Remove the power operator
<literal>a^b
</literal> for type
<type>integer
</type>:
108 DROP OPERATOR ^ (integer, integer);
113 Remove the left unary bitwise complement operator
114 <literal>~b
</literal> for type
<type>bit
</type>:
116 DROP OPERATOR ~ (none, bit);
121 Remove the right unary factorial operator
<literal>x!
</literal>
122 for type
<type>bigint
</type>:
124 DROP OPERATOR ! (bigint, none);
130 <title>Compatibility
</title>
133 There is no
<command>DROP OPERATOR
</command> statement in the SQL standard.
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>