mirror of https://github.com/citusdata/citus.git
Fixes ALTER COLLATION encoding does not exist bug
parent
9c7fde92b6
commit
4690c42121
|
@ -124,7 +124,6 @@ QualifyCollationName(List *name)
|
||||||
(Form_pg_collation) GETSTRUCT(colltup);
|
(Form_pg_collation) GETSTRUCT(colltup);
|
||||||
|
|
||||||
schemaName = get_namespace_name(collationForm->collnamespace);
|
schemaName = get_namespace_name(collationForm->collnamespace);
|
||||||
collationName = NameStr(collationForm->collname);
|
|
||||||
name = list_make2(makeString(schemaName), makeString(collationName));
|
name = list_make2(makeString(schemaName), makeString(collationName));
|
||||||
ReleaseSysCache(colltup);
|
ReleaseSysCache(colltup);
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,3 +184,36 @@ SET citus.enable_ddl_propagation TO on;
|
||||||
CREATE COLLATION pg_temp.temp_collation (provider = icu, locale = 'de-u-co-phonebk');
|
CREATE COLLATION pg_temp.temp_collation (provider = icu, locale = 'de-u-co-phonebk');
|
||||||
WARNING: "collation pg_temp_xxx.temp_collation" has dependency on unsupported object "schema pg_temp_xxx"
|
WARNING: "collation pg_temp_xxx.temp_collation" has dependency on unsupported object "schema pg_temp_xxx"
|
||||||
DETAIL: "collation pg_temp_xxx.temp_collation" will be created only locally
|
DETAIL: "collation pg_temp_xxx.temp_collation" will be created only locally
|
||||||
|
SET client_min_messages TO ERROR;
|
||||||
|
CREATE USER alter_collation_user;
|
||||||
|
SELECT 1 FROM run_command_on_workers('CREATE USER alter_collation_user');
|
||||||
|
?column?
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
1
|
||||||
|
1
|
||||||
|
(2 rows)
|
||||||
|
|
||||||
|
RESET client_min_messages;
|
||||||
|
CREATE COLLATION alter_collation FROM "C";
|
||||||
|
ALTER COLLATION alter_collation OWNER TO alter_collation_user;
|
||||||
|
SELECT result FROM run_command_on_all_nodes('
|
||||||
|
SELECT collowner::regrole FROM pg_collation WHERE collname = ''alter_collation'';
|
||||||
|
');
|
||||||
|
result
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
alter_collation_user
|
||||||
|
alter_collation_user
|
||||||
|
alter_collation_user
|
||||||
|
(3 rows)
|
||||||
|
|
||||||
|
DROP COLLATION alter_collation;
|
||||||
|
SET client_min_messages TO ERROR;
|
||||||
|
DROP USER alter_collation_user;
|
||||||
|
SELECT 1 FROM run_command_on_workers('DROP USER alter_collation_user');
|
||||||
|
?column?
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
1
|
||||||
|
1
|
||||||
|
(2 rows)
|
||||||
|
|
||||||
|
RESET client_min_messages;
|
||||||
|
|
|
@ -114,3 +114,21 @@ SET citus.enable_ddl_propagation TO on;
|
||||||
|
|
||||||
-- will skip trying to propagate the collation due to temp schema
|
-- will skip trying to propagate the collation due to temp schema
|
||||||
CREATE COLLATION pg_temp.temp_collation (provider = icu, locale = 'de-u-co-phonebk');
|
CREATE COLLATION pg_temp.temp_collation (provider = icu, locale = 'de-u-co-phonebk');
|
||||||
|
|
||||||
|
SET client_min_messages TO ERROR;
|
||||||
|
CREATE USER alter_collation_user;
|
||||||
|
SELECT 1 FROM run_command_on_workers('CREATE USER alter_collation_user');
|
||||||
|
RESET client_min_messages;
|
||||||
|
|
||||||
|
CREATE COLLATION alter_collation FROM "C";
|
||||||
|
ALTER COLLATION alter_collation OWNER TO alter_collation_user;
|
||||||
|
|
||||||
|
SELECT result FROM run_command_on_all_nodes('
|
||||||
|
SELECT collowner::regrole FROM pg_collation WHERE collname = ''alter_collation'';
|
||||||
|
');
|
||||||
|
|
||||||
|
DROP COLLATION alter_collation;
|
||||||
|
SET client_min_messages TO ERROR;
|
||||||
|
DROP USER alter_collation_user;
|
||||||
|
SELECT 1 FROM run_command_on_workers('DROP USER alter_collation_user');
|
||||||
|
RESET client_min_messages;
|
||||||
|
|
Loading…
Reference in New Issue