mirror of https://github.com/citusdata/citus.git
Fixes review comments
parent
9536ba17b3
commit
04d2e9fb2f
|
@ -164,10 +164,6 @@ AppendRoleOption(StringInfo buf, ListCell *optionCell)
|
|||
{
|
||||
appendStringInfo(buf, " CONNECTION LIMIT %d", intVal(option->arg));
|
||||
}
|
||||
else if (strcmp(option->defname, "sysid") == 0)
|
||||
{
|
||||
appendStringInfo(buf, " SYSID %d", intVal(option->arg));
|
||||
}
|
||||
else if (strcmp(option->defname, "password") == 0)
|
||||
{
|
||||
if (option->arg != NULL)
|
||||
|
@ -204,10 +200,20 @@ DeparseCreateRoleStmt(Node *node)
|
|||
return buf.data;
|
||||
}
|
||||
|
||||
static void
|
||||
AppendSysIdStatement(StringInfo buf, ListCell *optionCell)
|
||||
{
|
||||
DefElem *option = (DefElem *) lfirst(optionCell);
|
||||
if (strcmp(option->defname, "sysid") == 0)
|
||||
{
|
||||
appendStringInfo(buf, " SYSID %d", intVal(option->arg));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* AppendRoleOption generates the string representation of the DefElem option
|
||||
* and appends it to the buffer.
|
||||
* AppendInlinePriviliges generates the string representation for the inline
|
||||
* privileges of the role in create statement and appends it to the buffer.
|
||||
*/
|
||||
static void
|
||||
AppendInlinePriviliges(StringInfo buf, ListCell *optionCell)
|
||||
|
@ -277,6 +283,7 @@ AppendCreateRoleStmt(StringInfo buf, CreateRoleStmt *stmt)
|
|||
{
|
||||
AppendRoleOption(buf, optionCell);
|
||||
AppendInlinePriviliges(buf, optionCell);
|
||||
AppendSysIdStatement(buf, optionCell);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -405,7 +405,7 @@ NOTICE: issuing ALTER ROLE test1 RENAME TO test2;
|
|||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER ROLE test1 RENAME TO test2;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
drop user if exists test2;
|
||||
drop user test2;
|
||||
SET citus.log_remote_commands = false;
|
||||
DROP TABLE test_search_path;
|
||||
DROP SCHEMA alter_role, ",CitUs,.TeeN!?", test_sp CASCADE;
|
||||
|
|
|
@ -146,7 +146,7 @@ ALTER USER test1 SET random_page_cost TO 1.5;
|
|||
|
||||
alter user test1 rename to test2;
|
||||
|
||||
drop user if exists test2;
|
||||
drop user test2;
|
||||
|
||||
SET citus.log_remote_commands = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue