Adds grantor into metadata_sync

pull/7451/head
gurkanindibay 2024-02-09 12:04:58 +03:00
parent 29fdac0ab6
commit 28e5bf7f67
1 changed files with 5 additions and 1 deletions

View File

@ -901,7 +901,11 @@ GenerateGrantRoleStmtsOfRole(Oid roleid)
granteeRole->rolename = GetUserNameFromId(membership->member, true);
grantRoleStmt->grantee_roles = list_make1(granteeRole);
grantRoleStmt->grantor = NULL;
RoleSpec *grantorRole = makeNode(RoleSpec);
grantorRole->roletype = ROLESPEC_CSTRING;
grantorRole->location = -1;
grantorRole->rolename = GetUserNameFromId(membership->grantor, true);
grantRoleStmt->grantor = grantorRole;
#if PG_VERSION_NUM >= PG_VERSION_16