In Postgresql, you can create additional aggregate functions with
CREATE AGGREGATE name(...);
But this gives an error if the aggregate already exists inside the database, so how can I check if the aggregate exists in the Postgres database?
source share