3 PostgreSQL documentation
6 <refentry id=
"SQL-DROPAGGREGATE">
8 <refentrytitle id=
"SQL-DROPAGGREGATE-TITLE">DROP AGGREGATE
</refentrytitle>
9 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
13 <refname>DROP AGGREGATE
</refname>
14 <refpurpose>remove an aggregate function
</refpurpose>
17 <indexterm zone=
"sql-dropaggregate">
18 <primary>DROP AGGREGATE
</primary>
23 DROP AGGREGATE [ IF EXISTS ]
<replaceable class=
"PARAMETER">name
</replaceable> (
<replaceable class=
"PARAMETER">type
</replaceable> [ , ... ] ) [ CASCADE | RESTRICT ]
28 <title>Description
</title>
31 <command>DROP AGGREGATE
</command> removes an existing
32 aggregate function. To execute this command the current
33 user must be the owner of the aggregate function.
38 <title>Parameters
</title>
43 <term><literal>IF EXISTS
</literal></term>
46 Do not throw an error if the aggregate does not exist. A notice is issued
53 <term><replaceable class=
"parameter">name
</replaceable></term>
56 The name (optionally schema-qualified) of an existing aggregate function.
62 <term><replaceable class=
"parameter">type
</replaceable></term>
65 An input data type on which the aggregate function operates.
66 To reference a zero-argument aggregate function, write
<literal>*<
/>
67 in place of the list of input data types.
73 <term><literal>CASCADE
</literal></term>
76 Automatically drop objects that depend on the aggregate function.
82 <term><literal>RESTRICT
</literal></term>
85 Refuse to drop the aggregate function if any objects depend on
86 it. This is the default.
94 <title>Examples
</title>
97 To remove the aggregate function
<literal>myavg
</literal> for type
100 DROP AGGREGATE myavg(integer);
106 <title>Compatibility
</title>
109 There is no
<command>DROP AGGREGATE
</command> statement in the SQL
115 <title>See Also
</title>
117 <simplelist type=
"inline">
118 <member><xref linkend=
"sql-alteraggregate" endterm=
"sql-alteraggregate-title"></member>
119 <member><xref linkend=
"sql-createaggregate" endterm=
"sql-createaggregate-title"></member>