make tests passing

pull/7240/head
Onur Tirtir 2023-11-13 11:27:29 +03:00
parent fe24227638
commit 5b446b1137
3 changed files with 17 additions and 15 deletions

View File

@ -3958,7 +3958,9 @@ citus_internal_database_command(PG_FUNCTION_ARGS)
}
else
{
ereport(ERROR, (errmsg("unsupported command type %d", nodeTag(parseTree))));
ereport(ERROR, (errmsg("citus_internal_database_command() can only be used "
"for CREATE DATABASE and DROP DATABASE commands by "
"Citus.")));
}
/* rollback GUCs to the state before this session */

View File

@ -25,9 +25,9 @@ SELECT pg_catalog.citus_internal_database_command(null);
ERROR: command cannot be NULL
-- fails on non create / drop db command
SELECT pg_catalog.citus_internal_database_command('CREATE TABLE foo_bar(a int)');
ERROR: unsupported command type 255
ERROR: citus_internal_database_command() can only be used for CREATE DATABASE and DROP DATABASE commands by Citus.
SELECT pg_catalog.citus_internal_database_command('SELECT 1');
ERROR: unsupported command type 242
ERROR: citus_internal_database_command() can only be used for CREATE DATABASE and DROP DATABASE commands by Citus.
SELECT pg_catalog.citus_internal_database_command('asfsfdsg');
ERROR: syntax error at or near "asfsfdsg"
SELECT pg_catalog.citus_internal_database_command('');
@ -140,17 +140,17 @@ SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_t
-- Test LC / LOCALE settings that don't match the ones provided in template db.
-- All should throw an error on the coordinator.
CREATE DATABASE lc_collate_test LC_COLLATE = 'en_US.UTF-8';
ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (C)
CREATE DATABASE lc_collate_test LC_COLLATE = 'C.UTF-8';
ERROR: new collation (C.UTF-8) is incompatible with the collation of the template database (C)
HINT: Use the same collation as in the template database, or use template0 as template.
CREATE DATABASE lc_ctype_test LC_CTYPE = 'en_US.UTF-8';
ERROR: new LC_CTYPE (en_US.UTF-8) is incompatible with the LC_CTYPE of the template database (C)
CREATE DATABASE lc_ctype_test LC_CTYPE = 'C.UTF-8';
ERROR: new LC_CTYPE (C.UTF-8) is incompatible with the LC_CTYPE of the template database (C)
HINT: Use the same LC_CTYPE as in the template database, or use template0 as template.
CREATE DATABASE locale_test LOCALE = 'en_US.UTF-8';
ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (C)
CREATE DATABASE locale_test LOCALE = 'C.UTF-8';
ERROR: new collation (C.UTF-8) is incompatible with the collation of the template database (C)
HINT: Use the same collation as in the template database, or use template0 as template.
CREATE DATABASE lc_collate_lc_ctype_test LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (C)
CREATE DATABASE lc_collate_lc_ctype_test LC_COLLATE = 'C.UTF-8' LC_CTYPE = 'C.UTF-8';
ERROR: new collation (C.UTF-8) is incompatible with the collation of the template database (C)
HINT: Use the same collation as in the template database, or use template0 as template.
-- Test LC / LOCALE settings that match the ones provided in template db.
CREATE DATABASE lc_collate_test LC_COLLATE = 'C';

View File

@ -96,10 +96,10 @@ SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_t
-- Test LC / LOCALE settings that don't match the ones provided in template db.
-- All should throw an error on the coordinator.
CREATE DATABASE lc_collate_test LC_COLLATE = 'en_US.UTF-8';
CREATE DATABASE lc_ctype_test LC_CTYPE = 'en_US.UTF-8';
CREATE DATABASE locale_test LOCALE = 'en_US.UTF-8';
CREATE DATABASE lc_collate_lc_ctype_test LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
CREATE DATABASE lc_collate_test LC_COLLATE = 'C.UTF-8';
CREATE DATABASE lc_ctype_test LC_CTYPE = 'C.UTF-8';
CREATE DATABASE locale_test LOCALE = 'C.UTF-8';
CREATE DATABASE lc_collate_lc_ctype_test LC_COLLATE = 'C.UTF-8' LC_CTYPE = 'C.UTF-8';
-- Test LC / LOCALE settings that match the ones provided in template db.
CREATE DATABASE lc_collate_test LC_COLLATE = 'C';