diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 1db9f930d06..ae788fc9edb 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -74,6 +74,9 @@ bool creating_extension = false; Oid CurrentExtensionObject = InvalidOid; +/* Hook for filtering extensions in pg_available_extensions */ +extension_is_visible_hook_type extension_is_visible_hook = NULL; + /* * Internal data structure to hold the results of parsing a control file */ diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index bc22d37f8ea..e48a86be54b 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -38,7 +38,6 @@ */ PGDLLIMPORT needs_fmgr_hook_type needs_fmgr_hook = NULL; PGDLLIMPORT fmgr_hook_type fmgr_hook = NULL; -PGDLLIMPORT extension_is_visible_hook_type extension_is_visible_hook = NULL; /* * Hashtable for fast lookup of external C functions diff --git a/src/include/commands/extension.h b/src/include/commands/extension.h index 42b2ed99b1f..7c2f580d482 100644 --- a/src/include/commands/extension.h +++ b/src/include/commands/extension.h @@ -55,4 +55,7 @@ extern Oid get_function_sibling_type(Oid funcoid, const char *typname); extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *oldschema); +typedef bool (*extension_is_visible_hook_type) (const char *extname); +extern PGDLLIMPORT extension_is_visible_hook_type extension_is_visible_hook; + #endif /* EXTENSION_H */ diff --git a/src/include/fmgr.h b/src/include/fmgr.h index 75a8e2ee4f9..dccf900075b 100644 --- a/src/include/fmgr.h +++ b/src/include/fmgr.h @@ -794,9 +794,6 @@ typedef void (*fmgr_hook_type) (FmgrHookEventType event, extern PGDLLIMPORT needs_fmgr_hook_type needs_fmgr_hook; extern PGDLLIMPORT fmgr_hook_type fmgr_hook; -typedef bool (*extension_is_visible_hook_type) (const char *extname); -extern PGDLLIMPORT extension_is_visible_hook_type extension_is_visible_hook; - #define FmgrHookIsNeeded(fn_oid) \ (!needs_fmgr_hook ? false : (*needs_fmgr_hook)(fn_oid))