Fixes review comments

pull/7388/head
gurkanindibay 2023-12-25 19:44:34 +03:00
parent 77bad0b90e
commit 339627fe9c
2 changed files with 16 additions and 16 deletions

View File

@ -1,13 +1,13 @@
set citus.log_remote_commands to on; set citus.log_remote_commands to on;
set citus.grep_remote_commands to 'COMMENT ON ROLE'; set citus.grep_remote_commands to 'COMMENT ON ROLE';
create role role1; create role "role1-\!escape";
comment on ROLE role1 is 'test-comment'; comment on ROLE "role1-\!escape" is 'test-comment';
SELECT result FROM run_command_on_all_nodes( SELECT result FROM run_command_on_all_nodes(
$$ $$
SELECT ds.description AS role_comment SELECT ds.description AS role_comment
FROM pg_roles r FROM pg_roles r
LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid
WHERE r.rolname = 'role1'; WHERE r.rolname = 'role1-\!escape';
$$ $$
); );
result result
@ -17,13 +17,13 @@ SELECT result FROM run_command_on_all_nodes(
test-comment test-comment
(3 rows) (3 rows)
comment on role role1 is 'comment-needs\!escape'; comment on role "role1-\!escape" is 'comment-needs\!escape';
SELECT result FROM run_command_on_all_nodes( SELECT result FROM run_command_on_all_nodes(
$$ $$
SELECT ds.description AS role_comment SELECT ds.description AS role_comment
FROM pg_roles r FROM pg_roles r
LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid
WHERE r.rolname = 'role1'; WHERE r.rolname = 'role1-\!escape';
$$ $$
); );
result result
@ -33,13 +33,13 @@ SELECT result FROM run_command_on_all_nodes(
comment-needs\!escape comment-needs\!escape
(3 rows) (3 rows)
comment on role role1 is NULL; comment on role "role1-\!escape" is NULL;
SELECT result FROM run_command_on_all_nodes( SELECT result FROM run_command_on_all_nodes(
$$ $$
SELECT ds.description AS role_comment SELECT ds.description AS role_comment
FROM pg_roles r FROM pg_roles r
LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid
WHERE r.rolname = 'role1'; WHERE r.rolname = 'role1-\!escape';
$$ $$
); );
result result
@ -49,6 +49,6 @@ SELECT result FROM run_command_on_all_nodes(
(3 rows) (3 rows)
drop role role1; drop role "role1-\!escape";
reset citus.grep_remote_commands; reset citus.grep_remote_commands;
reset citus.log_remote_commands; reset citus.log_remote_commands;

View File

@ -2,41 +2,41 @@ set citus.log_remote_commands to on;
set citus.grep_remote_commands to 'COMMENT ON ROLE'; set citus.grep_remote_commands to 'COMMENT ON ROLE';
create role role1; create role "role1-\!escape";
comment on ROLE role1 is 'test-comment'; comment on ROLE "role1-\!escape" is 'test-comment';
SELECT result FROM run_command_on_all_nodes( SELECT result FROM run_command_on_all_nodes(
$$ $$
SELECT ds.description AS role_comment SELECT ds.description AS role_comment
FROM pg_roles r FROM pg_roles r
LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid
WHERE r.rolname = 'role1'; WHERE r.rolname = 'role1-\!escape';
$$ $$
); );
comment on role role1 is 'comment-needs\!escape'; comment on role "role1-\!escape" is 'comment-needs\!escape';
SELECT result FROM run_command_on_all_nodes( SELECT result FROM run_command_on_all_nodes(
$$ $$
SELECT ds.description AS role_comment SELECT ds.description AS role_comment
FROM pg_roles r FROM pg_roles r
LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid
WHERE r.rolname = 'role1'; WHERE r.rolname = 'role1-\!escape';
$$ $$
); );
comment on role role1 is NULL; comment on role "role1-\!escape" is NULL;
SELECT result FROM run_command_on_all_nodes( SELECT result FROM run_command_on_all_nodes(
$$ $$
SELECT ds.description AS role_comment SELECT ds.description AS role_comment
FROM pg_roles r FROM pg_roles r
LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid LEFT JOIN pg_shdescription ds ON r.oid = ds.objoid
WHERE r.rolname = 'role1'; WHERE r.rolname = 'role1-\!escape';
$$ $$
); );
drop role role1; drop role "role1-\!escape";
reset citus.grep_remote_commands; reset citus.grep_remote_commands;
reset citus.log_remote_commands; reset citus.log_remote_commands;