4 DROP AGGREGATE — remove an aggregate function
8 DROP AGGREGATE [ IF EXISTS ] name ( aggregate_signature ) [, ...] [ CASCADE | RE
11 where aggregate_signature is:
14 [ argmode ] [ argname ] argtype [ , ... ] |
15 [ [ argmode ] [ argname ] argtype [ , ... ] ] ORDER BY [ argmode ] [ argname ] a
20 DROP AGGREGATE removes an existing aggregate function. To execute this
21 command the current user must be the owner of the aggregate function.
26 Do not throw an error if the aggregate does not exist. A notice
27 is issued in this case.
30 The name (optionally schema-qualified) of an existing aggregate
34 The mode of an argument: IN or VARIADIC. If omitted, the default
38 The name of an argument. Note that DROP AGGREGATE does not
39 actually pay any attention to argument names, since only the
40 argument data types are needed to determine the aggregate
44 An input data type on which the aggregate function operates. To
45 reference a zero-argument aggregate function, write * in place
46 of the list of argument specifications. To reference an
47 ordered-set aggregate function, write ORDER BY between the
48 direct and aggregated argument specifications.
51 Automatically drop objects that depend on the aggregate function
52 (such as views using it), and in turn all objects that depend on
53 those objects (see Section 5.15).
56 Refuse to drop the aggregate function if any objects depend on
57 it. This is the default.
61 Alternative syntaxes for referencing ordered-set aggregates are
62 described under ALTER AGGREGATE.
66 To remove the aggregate function myavg for type integer:
67 DROP AGGREGATE myavg(integer);
69 To remove the hypothetical-set aggregate function myrank, which takes
70 an arbitrary list of ordering columns and a matching list of direct
72 DROP AGGREGATE myrank(VARIADIC "any" ORDER BY VARIADIC "any");
74 To remove multiple aggregate functions in one command:
75 DROP AGGREGATE myavg(integer), myavg(bigint);
79 There is no DROP AGGREGATE statement in the SQL standard.
83 ALTER AGGREGATE, CREATE AGGREGATE