DROP AGGREGATE name type
This parameter takes the name of the existing aggregate function you wish to remove.
This parameter takes the type of the existing aggregate function you wish to remove.
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 aggregate to use this command.
Use the following example to remove the myavg aggregate for type int4.
DROP AGGREGATE myavg int4;