Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/backend/commands/extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
1 change: 0 additions & 1 deletion src/backend/utils/fmgr/fmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/include/commands/extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
3 changes: 0 additions & 3 deletions src/include/fmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
Loading