Message board

Normal messages

Need to find custom aggregate functions?

JT wrote: 🕐 03-11-26 15:28

If you are upgrading postgres from 9.x to a newer version, some changes to aggregate functions have been m,ade. Therefore, to identify existing custom aggregate functions, run this sql

 

SELECT n.nspname as schema_name, p.proname as aggregate_name, pg_catalog.format_type(p.prorettype, NULL) as return_type, p.prosrc as function_source, obj_description(p.oid, 'pg_proc') as description

FROM pg_proc p

JOIN pg_namespace n ON n.oid = p.pronamespace

JOIN pg_aggregate a ON a.aggfnoid = p.oid

WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')

ORDER BY schema_name, aggregate_name;

Less
Copy link
Sticky messages
Advanced Pgpool-II Training
🕐 10-24-25 11:48
770 Views
Replies
News - PostgreSQL 18 released
🕐 10-20-25 21:55
304 Views
Replies
News - pgAdmin 4 v9.9 Released
🕐 10-20-25 21:53
220 Views
Replies
PostgresSolutions.com launches
🕐 03-11-25 11:42
865 Views
Replies