Review changes

pg16_grant_inherit_set
Jodi-Ann Francis 2023-08-30 15:09:59 -04:00 committed by francisjodi
parent 9da1a70072
commit 712d15dc20
2 changed files with 10 additions and 23 deletions

View File

@ -409,28 +409,16 @@ AppendRevokeAdminOptionFor(StringInfo buf, GrantRoleStmt *stmt)
{ {
switch (opt->defname) switch (opt->defname)
{ {
case "admin": appendStringInfo(buf, "ADMIN OPTION FOR ");
appendStringInfo(buf, "ADMIN OPTION FOR "); }
opt_count++; else if (strcmp(opt->defname, "inherit") == 0);
break; {
appendStringInfo(buf, "INHERIT TRUE");
case "inherit": appendStringInfo(buf, "GRANT x TO y WITH INHERIT TRUE, SET TRUE;");
if (opt_count > 0) }
{ else if (strcmp(opt->defname, "set") == 0)
appendStringInfo(buf, ", "); {
} appendStringInfo(buf, "SET TRUE");
appendStringInfo(buf, "INHERIT OPTION FOR ");
opt_count++;
break;
case "set":
if (opt_count > 0)
{
appendStringInfo(buf, ", ");
}
appendStringInfo(buf, "SET OPTION FOR ");
opt_count++;
break;
} }
} }
} }

View File

@ -594,4 +594,3 @@ RESET citus.grep_remote_commands;
\set VERBOSITY terse \set VERBOSITY terse
SET client_min_messages TO ERROR; SET client_min_messages TO ERROR;
DROP SCHEMA pg16 CASCADE; DROP SCHEMA pg16 CASCADE;