diff --git a/src/backend/distributed/commands/role.c b/src/backend/distributed/commands/role.c index 797a63a02..2604aa5bb 100644 --- a/src/backend/distributed/commands/role.c +++ b/src/backend/distributed/commands/role.c @@ -56,13 +56,6 @@ #include "distributed/version_compat.h" #include "distributed/worker_transaction.h" -typedef struct DistributedRolesInGrantRoleStmt -{ - List *distributedGrantees; - List *distributedGrantedRoles; - RoleSpec *grantor; - bool isGrantRoleStmtValid; -} DistributedRolesInGrantRoleStmt; static const char * ExtractEncryptedPassword(Oid roleOid); static const char * CreateAlterRoleIfExistsCommand(AlterRoleStmt *stmt); @@ -1440,8 +1433,7 @@ ExtractDistributedRolesInGrantRoleStmt(GrantRoleStmt *stmt) bool grantorMissingOk = false; bool isGrantorDefined = distributedRolesInGrantRoleStmt->grantor != NULL && get_rolespec_oid(distributedRolesInGrantRoleStmt->grantor, - grantorMissingOk) != - InvalidOid; + grantorMissingOk) != InvalidOid; bool isGrantorDistributed = IsAnyObjectDistributed(RoleSpecToObjectAddress( distributedRolesInGrantRoleStmt ->grantor, grantorMissingOk)); diff --git a/src/include/distributed/commands.h b/src/include/distributed/commands.h index e0b45a8a2..d2dd3566a 100644 --- a/src/include/distributed/commands.h +++ b/src/include/distributed/commands.h @@ -170,6 +170,14 @@ typedef enum TenantOperation TENANT_SET_SCHEMA, } TenantOperation; +typedef struct DistributedRolesInGrantRoleStmt +{ + List *distributedGrantees; + List *distributedGrantedRoles; + RoleSpec *grantor; + bool isGrantRoleStmtValid; +} DistributedRolesInGrantRoleStmt; + #define TOTAL_TENANT_OPERATION 5 extern const char *TenantOperationNames[TOTAL_TENANT_OPERATION];