From a609d96778c1714b9af916477b2c30891fbe578a Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 23 Dec 2014 15:35:49 -0300 Subject: Revert "Use a bitmask to represent role attributes" This reverts commit 1826987a46d079458007b7b6bbcbbd852353adbb. The overall design was deemed unacceptable, in discussion following the previous commit message; we might find some parts of it still salvageable, but I don't want to be on the hook for fixing it, so let's wait until we have a new patch. --- src/backend/commands/variable.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/backend/commands/variable.c') diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index 491dc38caf3..6ce8daeb95a 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -776,7 +776,6 @@ check_session_authorization(char **newval, void **extra, GucSource source) Oid roleid; bool is_superuser; role_auth_extra *myextra; - RoleAttr attributes; /* Do nothing for the boot_val default of NULL */ if (*newval == NULL) @@ -801,8 +800,7 @@ check_session_authorization(char **newval, void **extra, GucSource source) } roleid = HeapTupleGetOid(roleTup); - attributes = ((Form_pg_authid) GETSTRUCT(roleTup))->rolattr; - is_superuser = (attributes & ROLE_ATTR_SUPERUSER); + is_superuser = ((Form_pg_authid) GETSTRUCT(roleTup))->rolsuper; ReleaseSysCache(roleTup); @@ -846,7 +844,6 @@ check_role(char **newval, void **extra, GucSource source) Oid roleid; bool is_superuser; role_auth_extra *myextra; - RoleAttr attributes; if (strcmp(*newval, "none") == 0) { @@ -875,8 +872,7 @@ check_role(char **newval, void **extra, GucSource source) } roleid = HeapTupleGetOid(roleTup); - attributes = ((Form_pg_authid) GETSTRUCT(roleTup))->rolattr; - is_superuser = (attributes & ROLE_ATTR_SUPERUSER); + is_superuser = ((Form_pg_authid) GETSTRUCT(roleTup))->rolsuper; ReleaseSysCache(roleTup); -- cgit v1.2.3