aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/variable.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2014-12-23 15:35:49 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2014-12-23 15:35:49 -0300
commita609d96778c1714b9af916477b2c30891fbe578a (patch)
tree66b7073c9e67e708136d3c3450d7cbdd81b06a73 /src/backend/commands/variable.c
parentd7ee82e50f624221db76023c17137661fe69ec61 (diff)
downloadpostgresql-a609d96778c1714b9af916477b2c30891fbe578a.tar.gz
postgresql-a609d96778c1714b9af916477b2c30891fbe578a.zip
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.
Diffstat (limited to 'src/backend/commands/variable.c')
-rw-r--r--src/backend/commands/variable.c8
1 files changed, 2 insertions, 6 deletions
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);