mirror of https://github.com/citusdata/citus.git
Merge branch 'main' of https://github.com/ThomasC02/citus into feature/revoke-cascade-support
Added Support for CASCADE/RESTRICT in REVOKE statements updated testing Issue #7105pull/7958/head
commit
1f28849d3d
|
@ -179,6 +179,23 @@ PreprocessGrantStmt(Node *node, const char *queryString,
|
||||||
grantOption = "GRANT OPTION FOR ";
|
grantOption = "GRANT OPTION FOR ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appendStringInfo(&ddlString, "REVOKE %s%s ON %s FROM %s",
|
||||||
|
grantOption, privsString.data, targetString.data,
|
||||||
|
granteesString.data);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
if (grantStmt->behavior == DROP_CASCADE)
|
||||||
|
{
|
||||||
|
appendStringInfoString(&ddlString, " CASCADE");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
appendStringInfoString(&ddlString, " RESTRICT");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
=======
|
||||||
|
>>>>>>> b233b0a2a6d590e6b2565eb8278aeec4e6021773
|
||||||
|
|
||||||
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);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -424,8 +424,19 @@ SELECT id FROM grant_table_propagated_after;
|
||||||
:verify_grant_table ;
|
:verify_grant_table ;
|
||||||
:verify_grant_attributes ;
|
:verify_grant_attributes ;
|
||||||
|
|
||||||
-- cleanup
|
-- cleanup and test revoke
|
||||||
REVOKE SELECT (id) ON grant_table_propagated_after FROM grant_user_0;
|
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;
|
||||||
|
RESET citus.grep_remote_commands;
|
||||||
|
RESET citus.log_remote_commands;
|
||||||
|
|
||||||
:verify_grant_table ;
|
:verify_grant_table ;
|
||||||
:verify_grant_attributes ;
|
:verify_grant_attributes ;
|
||||||
|
|
Loading…
Reference in New Issue