We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1fc51a commit 301ca0dCopy full SHA for 301ca0d
contrib/pgrowlocks/pgrowlocks.c
@@ -101,8 +101,9 @@ pgrowlocks(PG_FUNCTION_ARGS)
101
102
/* check permissions: must have SELECT on table or be in pg_stat_scan_tables */
103
aclresult = pg_class_aclcheck(RelationGetRelid(rel), GetUserId(),
104
- ACL_SELECT) ||
105
- is_member_of_role(GetUserId(), DEFAULT_ROLE_STAT_SCAN_TABLES);
+ ACL_SELECT);
+ if (aclresult != ACLCHECK_OK)
106
+ aclresult = is_member_of_role(GetUserId(), DEFAULT_ROLE_STAT_SCAN_TABLES) ? ACLCHECK_OK : ACLCHECK_NO_PRIV;
107
108
if (aclresult != ACLCHECK_OK)
109
aclcheck_error(aclresult, ACL_KIND_CLASS,
0 commit comments