]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_aggregate.sgml
Create a "sort support" interface API for faster sorting.
[postgresql] / doc / src / sgml / ref / drop_aggregate.sgml
1 <!--
2 doc/src/sgml/ref/drop_aggregate.sgml
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPAGGREGATE">
7  <refmeta>
8   <refentrytitle>DROP AGGREGATE</refentrytitle>
9   <manvolnum>7</manvolnum>
10   <refmiscinfo>SQL - Language Statements</refmiscinfo>
11  </refmeta>
12
13  <refnamediv>
14   <refname>DROP AGGREGATE</refname>
15   <refpurpose>remove an aggregate function</refpurpose>
16  </refnamediv>
17
18  <indexterm zone="sql-dropaggregate">
19   <primary>DROP AGGREGATE</primary>
20  </indexterm>
21
22  <refsynopsisdiv>
23 <synopsis>
24 DROP AGGREGATE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">type</replaceable> [ , ... ] ) [ CASCADE | RESTRICT ]
25 </synopsis>
26  </refsynopsisdiv>
27
28  <refsect1>
29   <title>Description</title>
30
31   <para>
32    <command>DROP AGGREGATE</command> removes an existing
33    aggregate function. To execute this command the current
34    user must be the owner of the aggregate function.
35   </para>
36  </refsect1>
37
38  <refsect1>
39   <title>Parameters</title>
40
41   <variablelist>
42
43    <varlistentry>
44     <term><literal>IF EXISTS</literal></term>
45     <listitem>
46      <para>
47       Do not throw an error if the aggregate does not exist. A notice is issued
48       in this case.
49      </para>
50     </listitem>
51    </varlistentry>
52
53    <varlistentry>
54     <term><replaceable class="parameter">name</replaceable></term>
55     <listitem>
56      <para>
57       The name (optionally schema-qualified) of an existing aggregate function.
58      </para>
59     </listitem>
60    </varlistentry>
61
62    <varlistentry>
63     <term><replaceable class="parameter">type</replaceable></term>
64     <listitem>
65      <para>
66       An input data type on which the aggregate function operates.
67       To reference a zero-argument aggregate function, write <literal>*</>
68       in place of the list of input data types.
69      </para>
70     </listitem>
71    </varlistentry>
72
73    <varlistentry>
74     <term><literal>CASCADE</literal></term>
75     <listitem>
76      <para>
77       Automatically drop objects that depend on the aggregate function.
78      </para>
79     </listitem>
80    </varlistentry>
81
82    <varlistentry>
83     <term><literal>RESTRICT</literal></term>
84     <listitem>
85      <para>
86       Refuse to drop the aggregate function if any objects depend on
87       it.  This is the default.
88      </para>
89     </listitem>
90    </varlistentry>
91   </variablelist>
92  </refsect1>
93
94  <refsect1>
95   <title>Examples</title>
96
97   <para>
98    To remove the aggregate function <literal>myavg</literal> for type
99    <type>integer</type>:
100 <programlisting>
101 DROP AGGREGATE myavg(integer);
102 </programlisting></para>
103  </refsect1>
104
105  <refsect1>
106   <title>Compatibility</title>
107
108   <para>
109    There is no <command>DROP AGGREGATE</command> statement in the SQL
110    standard.
111   </para>
112  </refsect1>
113
114  <refsect1>
115   <title>See Also</title>
116
117   <simplelist type="inline">
118    <member><xref linkend="sql-alteraggregate"></member>
119    <member><xref linkend="sql-createaggregate"></member>
120   </simplelist>
121  </refsect1>
122
123 </refentry>