mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Revert "Use a bitmask to represent role attributes"
This reverts commit 1826987a46.
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user