or <literal>*</literal> if the function accepts any input type.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CASCADE</term>
<listitem>
<para>
Automatically drop objects that depend on the aggregate.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RESTRICT</term>
<listitem>
<para>
Refuse to drop the aggregate if there are any dependent objects.
This is the default.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2 id="R2-SQL-DROPAGGREGATE-2">
<refsect2info>
<date>1998-04-15</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
DROP AGGREGATE
</computeroutput></term>
<listitem>
<para>
Message returned if the command is successful.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: RemoveAggregate: aggregate '<replaceable class="parameter">name</replaceable>' for type <replaceable class="parameter">type</replaceable> does not exist
</computeroutput></term>
<listitem>
<para>
This message occurs if the aggregate function specified does not
exist in the database.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPAGGREGATE-1">
<refsect1>
<refsect1info>
<title>Description</title>
<date>1998-04-15</date>
</refsect1info>
<title>
Description
</title>
<para>
<para>
<command>DROP AGGREGATE</command> will delete an existing
<command>DROP AGGREGATE</command> will delete an existing
aggregate definition. To execute this command the current
aggregate function. To execute this command the current
<term><computeroutput>ERROR: RemoveAggregate: aggregate '<replaceable class="parameter">name</replaceable>' for type <replaceable class="parameter">type</replaceable> does not exist</computeroutput></term>
<listitem>
<para>
This message is returned if the specified aggregate function
does not exist.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
To remove the aggregate function <literal>myavg</literal> for type
<type>integer</type>:
<programlisting>
DROP AGGREGATE myavg(integer);
</programlisting>
</para>
</refsect1>
</refsect1>
<refsect1 id="R1-SQL-DROPAGGREGATE-2">
<refsect1>
<title>
<title>Compatibility</title>
Usage
</title>
<para>
<para>
To remove the <literal>myavg</literal> aggregate for type
There is no <command>DROP AGGREGATE</command> statement in the SQL
Automatically drop objects that depend on the function
(such as operators or triggers).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RESTRICT</term>
<listitem>
<para>
Refuse to drop the function if there are any dependent objects.
This is the default.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2 id="R2-SQL-DROPFUNCTION-2">
<refsect2info>
<date>1998-04-15</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
DROP FUNCTION
</computeroutput></term>
<listitem>
<para>
Message returned if the command completes successfully.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
WARNING: RemoveFunction: Function "<replaceable class="parameter">name</replaceable>" ("<replaceable class="parameter">types</replaceable>") does not exist
</computeroutput></term>
<listitem>
<para>
This message is given if the function specified does not
exist in the current database.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPFUNCTION-1">
<refsect1>
<refsect1info>
<title>Description</title>
<date>1998-04-15</date>
</refsect1info>
<title>
Description
</title>
<para>
<para>
DROP FUNCTION will remove the definition of an existing
<command>DROP FUNCTION</command> removes the definition of an existing
function. To execute this command the user must be the
function. To execute this command the user must be the
owner of the function. The input argument types to the
owner of the function. The argument types to the
function must be specified, since several different functions
function must be specified, since several different functions
may exist with the same name and different argument lists.
may exist with the same name and different argument lists.
Message returned if the command completes successfully.
</para>
</listitem>
</varlistentry>
<para>
<varlistentry>
Refer to
<term><computeroutput>WARNING: RemoveFunction: Function <replaceable class="parameter">name</replaceable> (<replaceable class="parameter">types</replaceable>) does not exist</computeroutput></term>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
</refmeta>
<refnamediv>
<refnamediv>
<refname>
<refname>DROP OPERATOR CLASS</refname>
DROP OPERATOR CLASS
<refpurpose>remove a user-defined operator class</refpurpose>
</refname>
<refpurpose>
remove a user-defined operator class
</refpurpose>
</refnamediv>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<synopsis>
<date>2002-07-28</date>
DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">index_method</replaceable> [ CASCADE | RESTRICT ]
</refsynopsisdivinfo>
</synopsis>
<synopsis>
DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">access_method</replaceable> [ CASCADE | RESTRICT ]
The type of the operator's right argument; write <literal>NONE</literal> if the
operator has no right argument.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CASCADE</term>
<listitem>
<para>
Automatically drop objects that depend on the operator.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RESTRICT</term>
<listitem>
<para>
Refuse to drop the operator if there are any dependent objects.
This is the default.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2 id="R2-SQL-DROPOPERATOR-2">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
DROP OPERATOR
</computeroutput></term>
<listitem>
<para>
The message returned if the command is successful.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: RemoveOperator: binary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' and '<replaceable class="PARAMETER">righttype</replaceable>' does not exist
</computeroutput></term>
<listitem>
<para>
This message occurs if the specified binary operator does not exist.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: RemoveOperator: left unary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' does not exist
</computeroutput></term>
<listitem>
<para>
This message occurs if the left unary operator
specified does not exist.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: RemoveOperator: right unary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">righttype</replaceable>' does not exist
</computeroutput></term>
<listitem>
<para>
This message occurs if the right unary operator
specified does not exist.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPOPERATOR-1">
<refsect1>
<refsect1info>
<title>Description</title>
<date>1998-09-22</date>
</refsect1info>
<title>
Description
</title>
<para>
<command>DROP OPERATOR</command> drops an existing operator from the
database.
To execute this command you must be the owner of the operator.
</para>
<para>
<para>
The left or right type of a left or right unary
<command>DROP OPERATOR</command> drops an existing operator from
operator, respectively, must be specified as <literal>NONE</literal>.
the database system. To execute this command you must be the owner
<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>
<listitem>
<para>
This message is returned if the specified binary operator does not exist.
</para>
</listitem>
</varlistentry>
<programlisting>
<varlistentry>
DROP OPERATOR ^ (int4, int4);
<term><computeroutput>ERROR: RemoveOperator: left unary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' does not exist</computeroutput></term>
</programlisting>
<listitem>
<para>
This message is returned if the specified left unary operator
does not exist.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>ERROR: RemoveOperator: right unary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">righttype</replaceable>' does not exist</computeroutput></term>
<listitem>
<para>
This message is returned if the specified right unary operator
does not exist.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Remove the power operator <literal>a^b</literal> for type <type>integer</type>:
<programlisting>
DROP OPERATOR ^ (integer, integer);
</programlisting>
</para>
</para>
<para>
<para>
Remove left unary negation operator (<literal>! b</literal>) for <type>boolean</type>:
Remove the left unary bitwise complement operator
<programlisting>
<literal>~b</literal> for type <type>bit</type>:
DROP OPERATOR ! (none, bool);
<programlisting>
</programlisting>
DROP OPERATOR ~ (none, bit);
</programlisting>
</para>
</para>
<para>
<para>
Remove right unary factorial operator (<literal>i !</literal>) for
Remove the right unary factorial operator <literal>x!</literal>
<literal>int4</literal>:
for type <type>integer</type>:
<programlisting>
<programlisting>
DROP OPERATOR ! (int4, none);
DROP OPERATOR ! (integer, none);
</programlisting>
</programlisting>
</para>
</para>
</refsect1>
</refsect1>
<refsect1 id="R1-SQL-DROPOPERATOR-3">
<refsect1>
<title>
<title>Compatibility</title>
Compatibility
</title>
<para>
There is no <command>DROP OPERATOR</command> statement in the SQL standard.
<refsect2 id="R2-SQL-DROPOPERATOR-4">
</para>
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
SQL92
</title>
<para>
There is no <command>DROP OPERATOR</command> in <acronym>SQL92</acronym>.
The name (optionally schema-qualified) of a table.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CASCADE</term>
<listitem>
<para>
Automatically drop objects that depend on the trigger.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RESTRICT</term>
<listitem>
<para>
Refuse to drop the trigger if there are any dependent objects.
This is the default.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2 id="R2-SQL-DROPTRIGGER-2">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
DROP TRIGGER
</computeroutput></term>
<listitem>
<para>
The message returned if the trigger is successfully dropped.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: DropTrigger: there is no trigger <replaceable class="PARAMETER">name</replaceable> on relation "<replaceable class="parameter">table</replaceable>"
</computeroutput></term>
<listitem>
<para>
This message occurs if the trigger specified does not exist.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPTRIGGER-1">
<refsect1>
<refsect1info>
<title>Description</title>
<date>1998-09-22</date>
</refsect1info>
<title>
Description
</title>
<para>
<para>
<command>DROP TRIGGER</command> will remove an existing
<command>DROP TRIGGER</command> will remove an existing
trigger definition. To execute this command the current
trigger definition. To execute this command, the current
user must be the owner of the table for which the trigger is defined.
user must be the owner of the table for which the trigger is defined.
</para>
</para>
</refsect1>
</refsect1>
<refsect1 id="SQL-DROPTRIGGER-examples">
<refsect1>
<title>Examples</title>
<title>Parameters</title>
<para>
<variablelist>
Destroy the <literal>if_dist_exists</literal> trigger
There is no <command>DROP TRIGGER</command> statement in
Message returned if the trigger was successfully dropped.
<acronym>SQL92</acronym>.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
<varlistentry>
<term>SQL99</term>
<term><computeroutput>ERROR: DropTrigger: there is no trigger <replaceable class="PARAMETER">name</replaceable> on relation "<replaceable class="parameter">table</replaceable>"</computeroutput></term>
<listitem>
<listitem>
<para>
<para>
The <command>DROP TRIGGER</command> statement in
Message returned if the specified trigger does not exist.
<productname>PostgreSQL</productname> is incompatible with
SQL99. In SQL99, trigger names are not local to tables, so the
command is simply <literal>DROP TRIGGER
<replaceable>name</replaceable></literal>.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</variablelist>
</refsect1>
</refsect1>
<refsect1 id="SQL-DROPTRIGGER-examples">
<title>Examples</title>
<para>
Destroy the trigger <literal>if_dist_exists</literal> on the table
<literal>films</literal>:
<programlisting>
DROP TRIGGER if_dist_exists ON films;
</programlisting>
</para>
</refsect1>
<refsect1 id="SQL-DROPTRIGGER-compatibility">
<title>Compatibility</title>
<para>
The <command>DROP TRIGGER</command> statement in
<productname>PostgreSQL</productname> is incompatible with the SQL
standard. In the SQL standard, trigger names are not local to
tables, so the command is simply <literal>DROP TRIGGER
<replaceable>name</replaceable></literal>.
</para>
</refsect1>
<refsect1>
<refsect1>
<title>See Also</title>
<title>See Also</title>
...
@@ -169,6 +130,7 @@ DROP TRIGGER if_dist_exists ON films;
...
@@ -169,6 +130,7 @@ DROP TRIGGER if_dist_exists ON films;