mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Remove non-functional code for unloading loadable modules.
The code for unloading a library has been commented-out for over 12
years, ever since commit 602a9ef5a7
, and we're
no closer to supporting it now than we were back then.
Nathan Bossart, reviewed by Michael Paquier and by me.
Discussion: http://postgr.es/m/Ynsc9bRL1caUSBSE@paquier.xyz
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user