mirror of https://github.com/citusdata/citus.git
fix
parent
824f5aea60
commit
b81655d61e
|
@ -182,7 +182,6 @@ PreprocessGrantStmt(Node *node, const char *queryString,
|
||||||
appendStringInfo(&ddlString, "REVOKE %s%s ON %s FROM %s",
|
appendStringInfo(&ddlString, "REVOKE %s%s ON %s FROM %s",
|
||||||
grantOption, privsString.data, targetString.data,
|
grantOption, privsString.data, targetString.data,
|
||||||
granteesString.data);
|
granteesString.data);
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
if (grantStmt->behavior == DROP_CASCADE)
|
if (grantStmt->behavior == DROP_CASCADE)
|
||||||
{
|
{
|
||||||
|
@ -193,23 +192,7 @@ PreprocessGrantStmt(Node *node, const char *queryString,
|
||||||
appendStringInfoString(&ddlString, " RESTRICT");
|
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));
|
DDLJob *ddlJob = palloc0(sizeof(DDLJob));
|
||||||
ObjectAddressSet(ddlJob->targetObjectAddress, RelationRelationId, relationId);
|
ObjectAddressSet(ddlJob->targetObjectAddress, RelationRelationId, relationId);
|
||||||
ddlJob->metadataSyncCommand = pstrdup(ddlString.data);
|
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
|
@ -424,17 +424,13 @@ SELECT id FROM grant_table_propagated_after;
|
||||||
:verify_grant_table ;
|
:verify_grant_table ;
|
||||||
:verify_grant_attributes ;
|
:verify_grant_attributes ;
|
||||||
|
|
||||||
-- cleanup and test revoke
|
-- cleanup and test revoke .. cascade/restrict
|
||||||
SET citus.log_remote_commands TO on;
|
SET citus.log_remote_commands TO on;
|
||||||
set citus.grep_remote_commands = '%REVOKE%';
|
set citus.grep_remote_commands = '%REVOKE%';
|
||||||
REVOKE SELECT (id) ON grant_table_propagated_after FROM grant_user_0 CASCADE;
|
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 RESTRICT;
|
||||||
|
REVOKE SELECT (id) ON grant_table_propagated_after FROM grant_user_0; -- implicit RESTRICT
|
||||||
|
|
||||||
RESET citus.grep_remote_commands;
|
RESET citus.grep_remote_commands;
|
||||||
RESET citus.log_remote_commands;
|
RESET citus.log_remote_commands;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue