Drop Aggregate

Removes an aggregate function from a database.

Synopsis

DROP AGGREGATE name type

Parameters

name

The name of the existing aggregate function you wish to remove.

type

The data type that the existing aggregate function accepts.

Results

DROP

The message returned when an aggregate function is dropped successfully.

ERROR: RemoveAggregate: aggregate 'name' for 'type' does not exist

The error returned if an aggregate function with the specified name and type does not exist.

Description

Use the DROP AGGREGATE command to remove an aggregate function definition from your database. As with other DROP commands, you must be the owner of the object that you are dropping.

Examples

The following example removes the sum aggregate for type text:

booktown=# DROP AGGREGATE sum text;
DROP

Get Practical PostgreSQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.