summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/superuser.c
diff options
context:
space:
mode:
authorAlvaro Herrera2014-12-23 18:35:49 +0000
committerAlvaro Herrera2014-12-23 18:35:49 +0000
commita609d96778c1714b9af916477b2c30891fbe578a (patch)
tree66b7073c9e67e708136d3c3450d7cbdd81b06a73 /src/backend/utils/misc/superuser.c
parentd7ee82e50f624221db76023c17137661fe69ec61 (diff)
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/utils/misc/superuser.c')
-rw-r--r--src/backend/utils/misc/superuser.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/utils/misc/superuser.c b/src/backend/utils/misc/superuser.c
index 67d070ca256..ff0f94711d7 100644
--- a/src/backend/utils/misc/superuser.c
+++ b/src/backend/utils/misc/superuser.c
@@ -58,7 +58,6 @@ superuser_arg(Oid roleid)
{
bool result;
HeapTuple rtup;
- RoleAttr attributes;
/* Quick out for cache hit */
if (OidIsValid(last_roleid) && last_roleid == roleid)
@@ -72,8 +71,7 @@ superuser_arg(Oid roleid)
rtup = SearchSysCache1(AUTHOID, ObjectIdGetDatum(roleid));
if (HeapTupleIsValid(rtup))
{
- attributes = ((Form_pg_authid) GETSTRUCT(rtup))->rolattr;
- result = (attributes & ROLE_ATTR_SUPERUSER);
+ result = ((Form_pg_authid) GETSTRUCT(rtup))->rolsuper;
ReleaseSysCache(rtup);
}
else