 SELECT n.nspname as "Schema",
         p.proname AS "Name",
         CASE p.proargtypes[0]
           WHEN 'pg_catalog."any"'::pg_catalog.regtype
           THEN CAST(pg_catalog.pg_gettext('(all types)') AS pg_catalog.text)
           ELSE pg_catalog.format_type(p.proargtypes[0], NULL)
         END AS "Data type",
         pg_catalog.obj_description(p.oid, 'pg_proc') as "Description"
    FROM pg_catalog.pg_proc p
    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace,
         (SELECT $1 AS cmd) AS cmd
   WHERE p.proisagg
     AND pg_catalog.pg_function_is_visible(p.oid)
ORDER BY 1, 2, 3