Skip to content

Commit

Permalink
Drop deprecated gucs mechanism
Browse files Browse the repository at this point in the history
This commit gets rid of the deprecated GUCs mechanism, thereby rendering
the old `set_user.superuser_whitelist` GUC useless.

Users should update their postgresql.conf to use the newer
`superuser_allowlist`.
  • Loading branch information
mpalmi committed Oct 14, 2022
1 parent 6d00d25 commit f1458e5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 91 deletions.
84 changes: 0 additions & 84 deletions deprecated_gucs.h

This file was deleted.

7 changes: 0 additions & 7 deletions set_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
PG_MODULE_MAGIC;

#include "compatibility.h"
#include "deprecated_gucs.h"

#define ALLOWLIST_WILDCARD "*"
#define SUPERUSER_AUDIT_TAG "AUDIT"
Expand Down Expand Up @@ -103,9 +102,6 @@ extern Datum set_user(PG_FUNCTION_ARGS);
void _PG_init(void);
void _PG_fini(void);

DEPRECATED_GUC(nosuperuser_target_whitelist, nosuperuser_target_allowlist, NOSU_TargetWhitelist, NOSU_TargetAllowlist)
DEPRECATED_GUC(superuser_whitelist, superuser_allowlist, SU_Whitelist, SU_Allowlist)

/* used to block set_config() */
static void set_user_object_access(ObjectAccessType access, Oid classId, Oid objectId, int subId, void *arg);
static void set_user_block_set_config(Oid functionId);
Expand Down Expand Up @@ -532,9 +528,6 @@ _PG_init(void)
NULL, &exit_on_error, true, PGC_SIGHUP,
0, NULL, NULL, NULL);

DefineDeprecatedStringVariable(nosuperuser_target_whitelist, nosuperuser_target_allowlist, NOSU_TargetWhitelist, NOSU_TargetAllowlist);
DefineDeprecatedStringVariable(superuser_whitelist, superuser_allowlist, SU_Whitelist, SU_Allowlist);

/* Install hook */
prev_hook = ProcessUtility_hook;
ProcessUtility_hook = PU_hook;
Expand Down

0 comments on commit f1458e5

Please sign in to comment.