mirror of https://github.com/citusdata/citus.git
Merge branch 'create_alter_database' of https://github.com/citusdata/citus into create_alter_database
commit
974e628884
|
@ -3958,7 +3958,9 @@ citus_internal_database_command(PG_FUNCTION_ARGS)
|
||||||
}
|
}
|
||||||
else
|
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 */
|
/* rollback GUCs to the state before this session */
|
||||||
|
|
|
@ -25,9 +25,9 @@ SELECT pg_catalog.citus_internal_database_command(null);
|
||||||
ERROR: command cannot be NULL
|
ERROR: command cannot be NULL
|
||||||
-- fails on non create / drop db command
|
-- fails on non create / drop db command
|
||||||
SELECT pg_catalog.citus_internal_database_command('CREATE TABLE foo_bar(a int)');
|
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');
|
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');
|
SELECT pg_catalog.citus_internal_database_command('asfsfdsg');
|
||||||
ERROR: syntax error at or near "asfsfdsg"
|
ERROR: syntax error at or near "asfsfdsg"
|
||||||
SELECT pg_catalog.citus_internal_database_command('');
|
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.
|
-- Test LC / LOCALE settings that don't match the ones provided in template db.
|
||||||
-- All should throw an error on the coordinator.
|
-- All should throw an error on the coordinator.
|
||||||
CREATE DATABASE lc_collate_test LC_COLLATE = 'en_US.UTF-8';
|
CREATE DATABASE lc_collate_test LC_COLLATE = 'C.UTF-8';
|
||||||
ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (C)
|
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.
|
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';
|
CREATE DATABASE lc_ctype_test LC_CTYPE = 'C.UTF-8';
|
||||||
ERROR: new LC_CTYPE (en_US.UTF-8) is incompatible with the LC_CTYPE of the template database (C)
|
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.
|
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';
|
CREATE DATABASE locale_test LOCALE = 'C.UTF-8';
|
||||||
ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (C)
|
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.
|
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';
|
CREATE DATABASE lc_collate_lc_ctype_test LC_COLLATE = 'C.UTF-8' LC_CTYPE = 'C.UTF-8';
|
||||||
ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (C)
|
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.
|
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.
|
-- Test LC / LOCALE settings that match the ones provided in template db.
|
||||||
CREATE DATABASE lc_collate_test LC_COLLATE = 'C';
|
CREATE DATABASE lc_collate_test LC_COLLATE = 'C';
|
||||||
|
|
|
@ -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.
|
-- Test LC / LOCALE settings that don't match the ones provided in template db.
|
||||||
-- All should throw an error on the coordinator.
|
-- All should throw an error on the coordinator.
|
||||||
CREATE DATABASE lc_collate_test LC_COLLATE = 'en_US.UTF-8';
|
CREATE DATABASE lc_collate_test LC_COLLATE = 'C.UTF-8';
|
||||||
CREATE DATABASE lc_ctype_test LC_CTYPE = 'en_US.UTF-8';
|
CREATE DATABASE lc_ctype_test LC_CTYPE = 'C.UTF-8';
|
||||||
CREATE DATABASE locale_test LOCALE = 'en_US.UTF-8';
|
CREATE DATABASE locale_test LOCALE = 'C.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_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.
|
-- Test LC / LOCALE settings that match the ones provided in template db.
|
||||||
CREATE DATABASE lc_collate_test LC_COLLATE = 'C';
|
CREATE DATABASE lc_collate_test LC_COLLATE = 'C';
|
||||||
|
|
Loading…
Reference in New Issue