Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nielsbom/b2cb3c96fd8079b06ef939f6c0bb6c28 to your computer and use it in GitHub Desktop.
Save nielsbom/b2cb3c96fd8079b06ef939f6c0bb6c28 to your computer and use it in GitHub Desktop.
Generate string of function names installed by PostgreSQL extensions, for filtering *in* in DBeaver UI
with function_names (name) as (
SELECT
p.proname AS function_name
FROM
pg_proc p
LEFT JOIN
pg_depend d ON d.objid = p.oid
AND
d.deptype = 'e'
WHERE
p.pronamespace = 'public'::regnamespace
AND
d.objid IS NULL
AND
p.prokind = 'f'
ORDER BY
function_name
)
select array_to_string(
array(select * from function_names),
'|'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment