Skip to content

Add extension_is_visible_hook (PG 18)#926

Merged
dcw-data merged 2 commits intoREL_18_STABLE_neonfrom
dcw/extension-is-visible-hook-v18
Mar 20, 2026
Merged

Add extension_is_visible_hook (PG 18)#926
dcw-data merged 2 commits intoREL_18_STABLE_neonfrom
dcw/extension-is-visible-hook-v18

Conversation

@dcw-data
Copy link

Summary

Add extension_is_visible_hook to PostgreSQL that allows extensions to filter which extensions
are visible in pg_available_extensions and pg_available_extension_versions catalog views.

Changes

  • src/include/fmgr.h — Add extension_is_visible_hook_type typedef and extension_is_visible_hook extern
  • src/backend/utils/fmgr/fmgr.c — Initialize extension_is_visible_hook to NULL
  • src/backend/commands/extension.c — Call the hook in pg_available_extensions() and pg_available_extension_versions() to skip extensions where the hook returns false

The hook follows the standard PostgreSQL hook pattern: when NULL (default), behavior is unchanged.
Extensions can set the hook to filter which extensions are visible in the catalog views.

@dcw-data dcw-data requested a review from HaoyuHuang March 19, 2026 20:52
@dcw-data dcw-data merged commit 22a6ab8 into REL_18_STABLE_neon Mar 20, 2026
1 check passed
@dcw-data dcw-data deleted the dcw/extension-is-visible-hook-v18 branch March 20, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants