pull/7958/head
Onur Tirtir 2025-04-25 14:51:11 +03:00
parent 824f5aea60
commit b81655d61e
4 changed files with 379 additions and 1448 deletions

View File

@ -182,7 +182,6 @@ PreprocessGrantStmt(Node *node, const char *queryString,
appendStringInfo(&ddlString, "REVOKE %s%s ON %s FROM %s",
grantOption, privsString.data, targetString.data,
granteesString.data);
<<<<<<< HEAD
if (grantStmt->behavior == DROP_CASCADE)
{
@ -193,23 +192,7 @@ PreprocessGrantStmt(Node *node, const char *queryString,
appendStringInfoString(&ddlString, " RESTRICT");
}
}
=======
>>>>>>> b233b0a2a6d590e6b2565eb8278aeec4e6021773
appendStringInfo(&ddlString, "REVOKE %s%s ON %s FROM %s",
grantOption, privsString.data, targetString.data,
granteesString.data);
if (grantStmt->behavior == DROP_CASCADE)
{
appendStringInfoString(&ddlString, " CASCADE");
}
else
{
appendStringInfoString(&ddlString, " RESTRICT");
}
}
DDLJob *ddlJob = palloc0(sizeof(DDLJob));
ObjectAddressSet(ddlJob->targetObjectAddress, RelationRelationId, relationId);
ddlJob->metadataSyncCommand = pstrdup(ddlString.data);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -424,17 +424,13 @@ SELECT id FROM grant_table_propagated_after;
:verify_grant_table ;
:verify_grant_attributes ;
-- cleanup and test revoke
-- cleanup and test revoke .. cascade/restrict
SET citus.log_remote_commands TO on;
set citus.grep_remote_commands = '%REVOKE%';
REVOKE SELECT (id) ON grant_table_propagated_after FROM grant_user_0 CASCADE;
RESET citus.grep_remote_commands;
RESET citus.log_remote_commands;
-- cleanup and test revoke
SET citus.log_remote_commands TO on;
set citus.grep_remote_commands = '%REVOKE%';
REVOKE SELECT (id) ON grant_table_propagated_after FROM grant_user_0 RESTRICT;
REVOKE SELECT (id) ON grant_table_propagated_after FROM grant_user_0; -- implicit RESTRICT
RESET citus.grep_remote_commands;
RESET citus.log_remote_commands;