1999-07-22 17:09:15 +02:00
<!--
2002-01-20 23:19:57 +01:00
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.13 2002/01/20 22:19:56 petere Exp $
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>
1999-07-22 17:09:15 +02:00
<refentrytitle id="SQL-DROPOPERATOR-TITLE">
1998-09-07 17:53:12 +02:00
DROP OPERATOR
1999-07-06 19:16:42 +02:00
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
1998-09-07 17:53:12 +02:00
DROP OPERATOR
1999-07-06 19:16:42 +02:00
</refname>
<refpurpose>
2001-09-03 14:57:50 +02:00
remove a user-defined operator
1999-07-06 19:16:42 +02:00
</refpurpose>
1998-12-29 03:24:47 +01:00
</refnamediv>
1998-09-07 17:53:12 +02:00
1999-07-06 19:16:42 +02:00
<refsynopsisdiv>
<refsynopsisdivinfo>
1999-07-22 17:09:15 +02:00
<date>1999-07-20</date>
1999-07-06 19:16:42 +02:00
</refsynopsisdivinfo>
<synopsis>
2000-10-23 02:46:07 +02:00
DROP OPERATOR <replaceable class="PARAMETER">id</replaceable> ( <replaceable class="PARAMETER">lefttype</replaceable> | NONE , <replaceable class="PARAMETER">righttype</replaceable> | NONE )
1999-07-06 19:16:42 +02:00
</synopsis>
1998-09-07 17:53:12 +02:00
1999-07-06 19:16:42 +02:00
<refsect2 id="R2-SQL-DROPOPERATOR-1">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
1998-09-07 17:53:12 +02:00
Inputs
1999-07-06 19:16:42 +02:00
</title>
<para>
<variablelist>
<varlistentry>
<term><replaceable class="parameter">id</replaceable></term>
<listitem>
<para>
The identifier of an existing operator.
</para>
</listitem>
</varlistentry>
<varlistentry>
2000-10-23 02:46:07 +02:00
<term><replaceable class="parameter">lefttype</replaceable></term>
1999-07-06 19:16:42 +02:00
<listitem>
<para>
2000-10-23 02:46:07 +02:00
The type of the operator's left argument; write <literal>NONE</literal> if the
operator has no left argument.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">righttype</replaceable></term>
<listitem>
<para>
The type of the operator's right argument; write <literal>NONE</literal> if the
operator has no right argument.
1999-07-06 19:16:42 +02:00
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2 id="R2-SQL-DROPOPERATOR-2">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
1998-09-07 17:53:12 +02:00
Outputs
1999-07-06 19:16:42 +02:00
</title>
<para>
1998-10-30 20:34:40 +01:00
1999-07-06 19:16:42 +02:00
<variablelist>
<varlistentry>
<term><computeroutput>
DROP
</computeroutput></term>
<listitem>
<para>
The message returned if the command is successful.
1998-12-29 03:24:47 +01:00
</para>
</listitem>
</varlistentry>
1999-07-06 19:16:42 +02:00
<varlistentry>
<term><computeroutput>
2001-05-08 19:51:30 +02:00
ERROR: RemoveOperator: binary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' and '<replaceable class="PARAMETER">righttype</replaceable>' does not exist
1999-07-06 19:16:42 +02:00
</computeroutput></term>
<listitem>
<para>
This message occurs if the specified binary operator does not exist.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
2001-05-08 19:51:30 +02:00
ERROR: RemoveOperator: left unary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' does not exist
1999-07-06 19:16:42 +02:00
</computeroutput></term>
<listitem>
<para>
2000-10-05 21:48:34 +02:00
This message occurs if the left unary operator
1999-07-06 19:16:42 +02:00
specified does not exist.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
2001-05-08 19:51:30 +02:00
ERROR: RemoveOperator: right unary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">righttype</replaceable>' does not exist
1999-07-06 19:16:42 +02:00
</computeroutput></term>
<listitem>
<para>
2000-10-05 21:48:34 +02:00
This message occurs if the right unary operator
1999-07-06 19:16:42 +02:00
specified does not exist.
</para>
</listitem>
</varlistentry>
</variablelist>
1998-12-29 03:24:47 +01:00
</para>
1999-07-06 19:16:42 +02:00
</refsect2>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPOPERATOR-1">
<refsect1info>
<date>1998-09-22</date>
</refsect1info>
<title>
1998-09-07 17:53:12 +02:00
Description
1999-07-06 19:16:42 +02:00
</title>
<para>
<command>DROP OPERATOR</command> drops an existing operator from the
1998-09-07 17:53:12 +02:00
database.
To execute this command you must be the owner of the operator.
1999-07-06 19:16:42 +02:00
</para>
<para>
1998-09-07 17:53:12 +02:00
The left or right type of a left or right unary
2000-10-23 02:46:07 +02:00
operator, respectively, must be specified as <literal>NONE</literal>.
1999-07-06 19:16:42 +02:00
</para>
<refsect2 id="R2-SQL-DROPOPERATOR-3">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
1998-09-07 17:53:12 +02:00
Notes
1999-07-06 19:16:42 +02:00
</title>
<para>
1998-09-22 17:48:03 +02:00
The <command>DROP OPERATOR</command> statement is a
2001-12-08 04:24:40 +01:00
<productname>PostgreSQL</productname>
1998-09-07 17:53:12 +02:00
language extension.
1999-07-06 19:16:42 +02:00
</para>
<para>
1999-07-22 17:09:15 +02:00
Refer to
2000-12-26 00:15:27 +01:00
<xref linkend="sql-createoperator" endterm="sql-createoperator-title">
1999-07-22 17:09:15 +02:00
for information on how to create operators.
1999-07-06 19:16:42 +02:00
</para>
<para>
1998-09-22 17:48:03 +02:00
It is the user's responsibility to remove any access methods and
operator classes that rely on the deleted operator.
1999-07-06 19:16:42 +02:00
</para>
</refsect2>
1998-12-29 03:24:47 +01:00
</refsect1>
1999-07-06 19:16:42 +02:00
<refsect1 id="R1-SQL-DROPOPERATOR-2">
<title>
1998-09-07 17:53:12 +02:00
Usage
1999-07-06 19:16:42 +02:00
</title>
<para>
1998-09-07 17:53:12 +02:00
Remove power operator <literal>a^n</literal> for <literal>int4</literal>:
1999-07-06 19:16:42 +02:00
<programlisting>
1998-09-22 17:48:03 +02:00
DROP OPERATOR ^ (int4, int4);
1999-07-06 19:16:42 +02:00
</programlisting>
</para>
<para>
2002-01-20 23:19:57 +01:00
Remove left unary negation operator (<literal>! b</literal>) for <type>boolean</type>:
1999-07-06 19:16:42 +02:00
<programlisting>
1998-09-22 17:48:03 +02:00
DROP OPERATOR ! (none, bool);
1999-07-06 19:16:42 +02:00
</programlisting>
</para>
<para>
2000-10-23 02:46:07 +02:00
Remove right unary factorial operator (<literal>i !</literal>) for
1998-09-07 17:53:12 +02:00
<literal>int4</literal>:
1999-07-06 19:16:42 +02:00
<programlisting>
1998-09-22 17:48:03 +02:00
DROP OPERATOR ! (int4, none);
1999-07-06 19:16:42 +02:00
</programlisting>
</para>
</refsect1>
1998-09-07 17:53:12 +02:00
1999-07-06 19:16:42 +02:00
<refsect1 id="R1-SQL-DROPOPERATOR-3">
<title>
1998-09-07 17:53:12 +02:00
Compatibility
1999-07-06 19:16:42 +02:00
</title>
<refsect2 id="R2-SQL-DROPOPERATOR-4">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
1998-09-07 17:53:12 +02:00
SQL92
1999-07-06 19:16:42 +02:00
</title>
<para>
There is no <command>DROP OPERATOR</command> in <acronym>SQL92</acronym>.
</para>
1998-09-07 17:53:12 +02:00
</refsect2>
</refsect1>
1999-07-06 19:16:42 +02:00
</refentry>
1998-09-07 17:53:12 +02:00
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
1999-07-06 19:16:42 +02:00
sgml-omittag:nil
1998-09-07 17:53:12 +02:00
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->