pgsql: Fix a bug in roles_is_member_of. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Fix a bug in roles_is_member_of.
Date
Msg-id E1oTMq3-000koa-Pk@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix a bug in roles_is_member_of.

Commit e3ce2de09d814f8770b2e3b3c152b7671bcdb83f rearranged this
function to be able to identify which inherited role had admin option
on the target role, but it got the order of operations wrong, causing
the function to return wrong answers in the presence of non-inherited
grants.

Fix that, and add a test case that verifies the correct behavior.

Patch by me, reviewed by Nathan Bossart

Discussion: http://postgr.es/m/CA+TgmoYamnu-xt-u7CqjYWnRiJ6BQaSpYOHXP=r4QGTfd1N_EA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0101f770a05b07dd7a8e05b6f8f95d4e22f4e846

Modified Files
--------------
src/backend/utils/adt/acl.c              |  8 ++++----
src/test/regress/expected/privileges.out | 32 ++++++++++++++++++++++++++++++++
src/test/regress/sql/privileges.sql      | 25 +++++++++++++++++++++++++
3 files changed, 61 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: pgsql: doc: Fix typo in user inheritance documentation
Next
From: Tom Lane
Date:
Subject: pgsql: In the Snowball dictionary, don't try to stem excessively-long w