1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2010-09-20 22:08:53 +02:00
|
|
|
doc/src/sgml/ref/drop_operator.sgml
|
2001-12-08 04:24:40 +01:00
|
|
|
PostgreSQL documentation
|
1999-07-22 17:09:15 +02:00
|
|
|
-->
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refentry id="SQL-DROPOPERATOR">
|
|
|
|
<refmeta>
|
2010-04-03 09:23:02 +02:00
|
|
|
<refentrytitle>DROP OPERATOR</refentrytitle>
|
2008-11-14 11:22:48 +01:00
|
|
|
<manvolnum>7</manvolnum>
|
1999-07-06 19:16:42 +02:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
2003-05-04 04:23:16 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refnamediv>
|
2003-05-04 04:23:16 +02:00
|
|
|
<refname>DROP OPERATOR</refname>
|
2003-09-22 02:16:58 +02:00
|
|
|
<refpurpose>remove an operator</refpurpose>
|
1998-12-29 03:24:47 +01:00
|
|
|
</refnamediv>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2003-08-31 19:32:24 +02:00
|
|
|
<indexterm zone="sql-dropoperator">
|
|
|
|
<primary>DROP OPERATOR</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refsynopsisdiv>
|
2003-05-04 04:23:16 +02:00
|
|
|
<synopsis>
|
2009-09-19 12:23:27 +02:00
|
|
|
DROP OPERATOR [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( { <replaceable class="PARAMETER">left_type</replaceable> | NONE } , { <replaceable class="PARAMETER">right_type</replaceable> | NONE } ) [ CASCADE | RESTRICT ]
|
2003-05-04 04:23:16 +02:00
|
|
|
</synopsis>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refsynopsisdiv>
|
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<para>
|
2003-05-04 04:23:16 +02:00
|
|
|
<command>DROP OPERATOR</command> drops an existing operator from
|
|
|
|
the database system. To execute this command you must be the owner
|
|
|
|
of the operator.
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
2003-05-04 04:23:16 +02:00
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Parameters</title>
|
1999-07-06 19:16:42 +02:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<variablelist>
|
2006-06-17 00:27:55 +02:00
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><literal>IF EXISTS</literal></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2010-11-23 21:27:50 +01:00
|
|
|
Do not throw an error if the operator does not exist. A notice is issued
|
2006-06-17 00:27:55 +02:00
|
|
|
in this case.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name (optionally schema-qualified) of an existing operator.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">left_type</replaceable></term>
|
2003-05-04 04:23:16 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The data type of the operator's left operand; write
|
|
|
|
<literal>NONE</literal> if the operator has no left operand.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-09-19 12:23:27 +02:00
|
|
|
<term><replaceable class="parameter">right_type</replaceable></term>
|
2003-05-04 04:23:16 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The data type of the operator's right operand; write
|
|
|
|
<literal>NONE</literal> if the operator has no right operand.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><literal>CASCADE</literal></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Automatically drop objects that depend on the operator.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><literal>RESTRICT</literal></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Refuse to drop the operator if any objects depend on it. This
|
|
|
|
is the default.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
1998-12-29 03:24:47 +01:00
|
|
|
</refsect1>
|
1999-07-06 19:16:42 +02:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Remove the power operator <literal>a^b</literal> for type <type>integer</type>:
|
|
|
|
<programlisting>
|
|
|
|
DROP OPERATOR ^ (integer, integer);
|
|
|
|
</programlisting>
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
2003-05-04 04:23:16 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<para>
|
2003-05-04 04:23:16 +02:00
|
|
|
Remove the left unary bitwise complement operator
|
|
|
|
<literal>~b</literal> for type <type>bit</type>:
|
|
|
|
<programlisting>
|
|
|
|
DROP OPERATOR ~ (none, bit);
|
|
|
|
</programlisting>
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
2003-05-04 04:23:16 +02:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<para>
|
2003-05-04 04:23:16 +02:00
|
|
|
Remove the right unary factorial operator <literal>x!</literal>
|
2003-12-02 01:26:59 +01:00
|
|
|
for type <type>bigint</type>:
|
2003-05-04 04:23:16 +02:00
|
|
|
<programlisting>
|
2003-12-02 01:26:59 +01:00
|
|
|
DROP OPERATOR ! (bigint, none);
|
2011-08-07 09:49:45 +02:00
|
|
|
</programlisting></para>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refsect1>
|
2010-11-23 21:27:50 +01:00
|
|
|
|
2003-05-04 04:23:16 +02:00
|
|
|
<refsect1>
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
There is no <command>DROP OPERATOR</command> statement in the SQL standard.
|
|
|
|
</para>
|
1998-09-07 17:53:12 +02:00
|
|
|
</refsect1>
|
2003-05-04 04:23:16 +02:00
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
2010-04-03 09:23:02 +02:00
|
|
|
<member><xref linkend="sql-createoperator"></member>
|
|
|
|
<member><xref linkend="sql-alteroperator"></member>
|
2003-05-04 04:23:16 +02:00
|
|
|
</simplelist>
|
|
|
|
</refsect1>
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
</refentry>
|