diff options
Diffstat (limited to 'src/test')
4 files changed, 3 insertions, 53 deletions
diff --git a/src/test/modules/delay_execution/delay_execution.c b/src/test/modules/delay_execution/delay_execution.c index cf34e8c2d7d..407ebc0edaf 100644 --- a/src/test/modules/delay_execution/delay_execution.c +++ b/src/test/modules/delay_execution/delay_execution.c @@ -36,9 +36,8 @@ static int post_planning_lock_id = 0; /* Save previous planner hook user to be a good citizen */ static planner_hook_type prev_planner_hook = NULL; -/* Module load/unload functions */ +/* Module load function */ void _PG_init(void); -void _PG_fini(void); /* planner_hook function to provide the desired delay */ @@ -97,10 +96,3 @@ _PG_init(void) prev_planner_hook = planner_hook; planner_hook = delay_execution_planner; } - -/* Module unload function (pro forma, not used currently) */ -void -_PG_fini(void) -{ - planner_hook = prev_planner_hook; -} diff --git a/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c b/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c index b5bb5580a0f..e9f2329a5aa 100644 --- a/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c +++ b/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c @@ -21,7 +21,6 @@ PG_MODULE_MAGIC; void _PG_init(void); -void _PG_fini(void); static char *ssl_passphrase = NULL; @@ -55,12 +54,6 @@ _PG_init(void) openssl_tls_init_hook = set_rot13; } -void -_PG_fini(void) -{ - /* do nothing yet */ -} - static void set_rot13(SSL_CTX *context, bool isServerStart) { diff --git a/src/test/modules/test_oat_hooks/test_oat_hooks.c b/src/test/modules/test_oat_hooks/test_oat_hooks.c index 551da5d4986..6f9838f93b5 100644 --- a/src/test/modules/test_oat_hooks/test_oat_hooks.c +++ b/src/test/modules/test_oat_hooks/test_oat_hooks.c @@ -43,7 +43,7 @@ static bool REGRESS_userset_variable2 = false; static bool REGRESS_suset_variable1 = false; static bool REGRESS_suset_variable2 = false; -/* Saved hook values in case of unload */ +/* Saved hook values */ static object_access_hook_type next_object_access_hook = NULL; static object_access_hook_type_str next_object_access_hook_str = NULL; static ExecutorCheckPerms_hook_type next_exec_check_perms_hook = NULL; @@ -70,10 +70,9 @@ static char *accesstype_arg_to_string(ObjectAccessType access, void *arg); void _PG_init(void); -void _PG_fini(void); /* - * Module load/unload callback + * Module load callback */ void _PG_init(void) @@ -231,23 +230,6 @@ _PG_init(void) ProcessUtility_hook = REGRESS_utility_command; } -void -_PG_fini(void) -{ - /* Unload hooks */ - if (object_access_hook == REGRESS_object_access_hook) - object_access_hook = next_object_access_hook; - - if (object_access_hook_str == REGRESS_object_access_hook_str) - object_access_hook_str = next_object_access_hook_str; - - if (ExecutorCheckPerms_hook == REGRESS_exec_check_perms) - ExecutorCheckPerms_hook = next_exec_check_perms_hook; - - if (ProcessUtility_hook == REGRESS_utility_command) - ProcessUtility_hook = next_ProcessUtility_hook; -} - static void emit_audit_message(const char *type, const char *hook, char *action, char *objName) { diff --git a/src/test/modules/test_rls_hooks/test_rls_hooks.c b/src/test/modules/test_rls_hooks/test_rls_hooks.c index 4f862d081b0..b8e0aa2d0b3 100644 --- a/src/test/modules/test_rls_hooks/test_rls_hooks.c +++ b/src/test/modules/test_rls_hooks/test_rls_hooks.c @@ -29,34 +29,17 @@ PG_MODULE_MAGIC; -/* Saved hook values in case of unload */ -static row_security_policy_hook_type prev_row_security_policy_hook_permissive = NULL; -static row_security_policy_hook_type prev_row_security_policy_hook_restrictive = NULL; - void _PG_init(void); -void _PG_fini(void); /* Install hooks */ void _PG_init(void) { - /* Save values for unload */ - prev_row_security_policy_hook_permissive = row_security_policy_hook_permissive; - prev_row_security_policy_hook_restrictive = row_security_policy_hook_restrictive; - /* Set our hooks */ row_security_policy_hook_permissive = test_rls_hooks_permissive; row_security_policy_hook_restrictive = test_rls_hooks_restrictive; } -/* Uninstall hooks */ -void -_PG_fini(void) -{ - row_security_policy_hook_permissive = prev_row_security_policy_hook_permissive; - row_security_policy_hook_restrictive = prev_row_security_policy_hook_restrictive; -} - /* * Return permissive policies to be added */ |