Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
[PostgreSQL.git] / doc / src / sgml / ref / drop_aggregate.sgml
blobabb6c184e9a80322585356411271ec5a2030e6a7
1 <!--
2 $PostgreSQL$
3 PostgreSQL documentation
4 -->
6 <refentry id="SQL-DROPAGGREGATE">
7 <refmeta>
8 <refentrytitle id="SQL-DROPAGGREGATE-TITLE">DROP AGGREGATE</refentrytitle>
9 <refmiscinfo>SQL - Language Statements</refmiscinfo>
10 </refmeta>
12 <refnamediv>
13 <refname>DROP AGGREGATE</refname>
14 <refpurpose>remove an aggregate function</refpurpose>
15 </refnamediv>
17 <indexterm zone="sql-dropaggregate">
18 <primary>DROP AGGREGATE</primary>
19 </indexterm>
21 <refsynopsisdiv>
22 <synopsis>
23 DROP AGGREGATE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">type</replaceable> [ , ... ] ) [ CASCADE | RESTRICT ]
24 </synopsis>
25 </refsynopsisdiv>
27 <refsect1>
28 <title>Description</title>
30 <para>
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.
34 </para>
35 </refsect1>
37 <refsect1>
38 <title>Parameters</title>
40 <variablelist>
42 <varlistentry>
43 <term><literal>IF EXISTS</literal></term>
44 <listitem>
45 <para>
46 Do not throw an error if the aggregate does not exist. A notice is issued
47 in this case.
48 </para>
49 </listitem>
50 </varlistentry>
52 <varlistentry>
53 <term><replaceable class="parameter">name</replaceable></term>
54 <listitem>
55 <para>
56 The name (optionally schema-qualified) of an existing aggregate function.
57 </para>
58 </listitem>
59 </varlistentry>
61 <varlistentry>
62 <term><replaceable class="parameter">type</replaceable></term>
63 <listitem>
64 <para>
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.
68 </para>
69 </listitem>
70 </varlistentry>
72 <varlistentry>
73 <term><literal>CASCADE</literal></term>
74 <listitem>
75 <para>
76 Automatically drop objects that depend on the aggregate function.
77 </para>
78 </listitem>
79 </varlistentry>
81 <varlistentry>
82 <term><literal>RESTRICT</literal></term>
83 <listitem>
84 <para>
85 Refuse to drop the aggregate function if any objects depend on
86 it. This is the default.
87 </para>
88 </listitem>
89 </varlistentry>
90 </variablelist>
91 </refsect1>
93 <refsect1>
94 <title>Examples</title>
96 <para>
97 To remove the aggregate function <literal>myavg</literal> for type
98 <type>integer</type>:
99 <programlisting>
100 DROP AGGREGATE myavg(integer);
101 </programlisting>
102 </para>
103 </refsect1>
105 <refsect1>
106 <title>Compatibility</title>
108 <para>
109 There is no <command>DROP AGGREGATE</command> statement in the SQL
110 standard.
111 </para>
112 </refsect1>
114 <refsect1>
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>
120 </simplelist>
121 </refsect1>
123 </refentry>