Skip to content

Commit

Permalink
Performance Improvement of create login in BBF
Browse files Browse the repository at this point in the history
Signed-off-by: ANJU BHARTI <[email protected]>
  • Loading branch information
ANJU BHARTI committed Dec 20, 2024
1 parent f424e4d commit 53e8c63
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/backend/utils/adt/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5076,7 +5076,18 @@ roles_is_member_of(Oid roleid, enum RoleRecurseType type,
*/
if (otherid == admin_of && form->admin_option &&
OidIsValid(admin_of) && !OidIsValid(*admin_role))
*admin_role = memberid;
{
*admin_role = memberid;

/*
* Need not to iterate through all the members
* if admin_role is found.
*/
if (sql_dialect == SQL_DIALECT_TSQL)
{
return NULL;
}
}

/* If we're supposed to ignore non-heritable grants, do so. */
if (type == ROLERECURSE_PRIVS && !form->inherit_option)
Expand Down

0 comments on commit 53e8c63

Please sign in to comment.