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>
</synopsis>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPAGGREGATE-1">
<refsect1info>
<date>1998-04-15</date>
</refsect1info>
<title>
Description
</title>
<refsect1>
<title>Description</title>
<para>
<command>DROP AGGREGATE</command> will delete an existing
aggregate definition. To execute this command the current
user must be the owner of the aggregate.
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 id="R1-SQL-DROPAGGREGATE-2">
<title>
Usage
</title>
<refsect1>
<title>Compatibility</title>
<para>
To remove the <literal>myavg</literal> aggregate for type
<literal>int4</literal>:
There is no <command>DROP AGGREGATE</command> statement in the SQL
standard.
</para>
<programlisting>
DROP AGGREGATE myavg(int4);
</programlisting>
</refsect1>
<refsect1 id="R1-SQL-DROPAGGREGATE-3">
<title>
Compatibility
</title>
<refsect2 id="R2-SQL-DROPAGGREGATE-4">
<refsect2info>
<date>1998-04-15</date>
</refsect2info>
<title>
SQL92
</title>
<para>
There is no <command>DROP AGGREGATE</command> statement
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>
</synopsis>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPFUNCTION-1">
<refsect1info>
<date>1998-04-15</date>
</refsect1info>
<title>
Description
</title>
<refsect1>
<title>Description</title>
<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
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
may exist with the same name and different argument lists.
<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 output if the function specified does not exist.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="SQL-DROPFUNCTION-examples">
...
...
@@ -149,8 +116,8 @@ DROP FUNCTION sqrt(integer);
<title>Compatibility</title>
<para>
A <command>DROP FUNCTION</command> statement is defined in SQL99. One of
its syntax forms is similar to PostgreSQL's.
A <command>DROP FUNCTION</command> statement is defined in the SQL
standard, but it is not compatible with this command.
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
DROP OPERATOR CLASS
</refname>
<refpurpose>
remove a user-defined operator class
</refpurpose>
<refname>DROP OPERATOR CLASS</refname>
<refpurpose>remove a user-defined operator class</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>2002-07-28</date>
</refsynopsisdivinfo>
<synopsis>
DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">access_method</replaceable> [ CASCADE | RESTRICT ]
The name of the index access method the operator class is for.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CASCADE</term>
<listitem>
<para>
Automatically drop objects that depend on the operator class.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RESTRICT</term>
<listitem>
<para>
Refuse to drop the operator class if there are any dependent objects.
This is the default.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2 id="R2-SQL-DROPOPCLASS-2">
<refsect2info>
<date>2002-07-28</date>
</refsect2info>
<title>
Outputs
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
DROP OPERATOR CLASS
</computeroutput></term>
<listitem>
<para>
The message returned if the command is successful.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<synopsis>
DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">index_method</replaceable> [ CASCADE | RESTRICT ]
</synopsis>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPOPCLASS-1">
<refsect1info>
<date>2002-07-28</date>
</refsect1info>
<title>
Description
</title>
<refsect1>
<title>Description</title>
<para>
<command>DROP OPERATOR CLASS</command> drops an existing operator class
from the database.
<command>DROP OPERATOR CLASS</command> drops an existing operator class.
To execute this command you must be the owner of the operator class.
</para>
</refsect1>
<refsect1>
<title>Parameters</title>
<refsect2 id="R2-SQL-DROPOPCLASS-3">
<refsect2info>
<date>2002-07-28</date>
</refsect2info>
<title>
Notes
</title>
<para>
The <command>DROP OPERATOR CLASS</command> statement is a
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
<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>
DROP OPERATOR ^ (int4, int4);
</programlisting>
<varlistentry>
<term><computeroutput>ERROR: RemoveOperator: left unary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' does not exist</computeroutput></term>
<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>
Remove left unary negation operator (<literal>! b</literal>) for <type>boolean</type>:
<programlisting>
DROP OPERATOR ! (none, bool);
</programlisting>
Remove the left unary bitwise complement operator
<literal>~b</literal> for type <type>bit</type>:
<programlisting>
DROP OPERATOR ~ (none, bit);
</programlisting>
</para>
<para>
Remove right unary factorial operator (<literal>i !</literal>) for
<literal>int4</literal>:
<programlisting>
DROP OPERATOR ! (int4, none);
</programlisting>
Remove the right unary factorial operator <literal>x!</literal>
for type <type>integer</type>:
<programlisting>
DROP OPERATOR ! (integer, none);
</programlisting>
</para>
</refsect1>
<refsect1 id="R1-SQL-DROPOPERATOR-3">
<title>
Compatibility
</title>
<refsect2 id="R2-SQL-DROPOPERATOR-4">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
SQL92
</title>
<para>
There is no <command>DROP OPERATOR</command> in <acronym>SQL92</acronym>.
</para>
</refsect2>
<refsect1>
<title>Compatibility</title>
<para>
There is no <command>DROP OPERATOR</command> statement in the SQL standard.
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>
</synopsis>
</refsynopsisdiv>
<refsect1 id="R1-SQL-DROPTRIGGER-1">
<refsect1info>
<date>1998-09-22</date>
</refsect1info>
<title>
Description
</title>
<refsect1>
<title>Description</title>
<para>
<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.
</para>
</refsect1>
<refsect1 id="SQL-DROPTRIGGER-examples">
<title>Examples</title>
<refsect1>
<title>Parameters</title>
<para>
Destroy the <literal>if_dist_exists</literal> trigger
There is no <command>DROP TRIGGER</command> statement in
<acronym>SQL92</acronym>.
Message returned if the trigger was successfully dropped.
</para>
</listitem>
</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>
<para>
The <command>DROP TRIGGER</command> statement in
<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>.
Message returned if the specified trigger does not exist.
</para>
</listitem>
</varlistentry>
</variablelist>
</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>
<title>See Also</title>
...
...
@@ -169,6 +130,7 @@ DROP TRIGGER if_dist_exists ON films;