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.

Revisions

  1. nielsbom created this gist Jul 4, 2024.
    22 changes: 22 additions & 0 deletions generate_dbeaver_function_name_include_filter.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    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),
    '|'
    );