--
-- MULTI_UTILITY_WARNINGS
--
-- Tests to check if we inform the user about potential caveats of creating new
-- databases, schemas, and roles.
SET citus.next_shard_id TO 1010000;
CREATE DATABASE new_database;
NOTICE:  Citus partially supports CREATE DATABASE for distributed databases
DETAIL:  Citus does not propagate CREATE DATABASE command to workers
HINT:  You can manually create a database and its extensions on workers.
CREATE ROLE new_role;
NOTICE:  not propagating CREATE ROLE/USER commands to worker nodes
HINT:  Connect to worker nodes directly to manually create all necessary users and roles.
CREATE USER new_user;
NOTICE:  not propagating CREATE ROLE/USER commands to worker nodes
HINT:  Connect to worker nodes directly to manually create all necessary users and roles.
INSERT INTO pg_dist_authinfo VALUES (0, 'new_user', 'password=1234');
ERROR:  cannot write to pg_dist_authinfo
DETAIL:  Citus Community Edition does not support the use of custom authentication options.
HINT:  To learn more about using advanced authentication schemes with Citus, please contact us at https://citusdata.com/about/contact_us
BEGIN;
INSERT INTO pg_dist_node VALUES (1234567890, 1234567890, 'localhost', 5432);
INSERT INTO pg_dist_poolinfo VALUES (1234567890, 'port=1234');
ERROR:  cannot write to pg_dist_poolinfo
DETAIL:  Citus Community Edition does not support the use of pooler options.
HINT:  To learn more about using advanced pooling schemes with Citus, please contact us at https://citusdata.com/about/contact_us
ROLLBACK;
INSERT INTO pg_dist_rebalance_strategy VALUES ('should fail', false, 'citus_shard_cost_1', 'citus_node_capacity_1', 'citus_shard_allowed_on_node_true', 0, 0);
ERROR:  cannot write to pg_dist_rebalance_strategy
DETAIL:  Citus Community Edition does not support the use of custom rebalance strategies.
HINT:  To learn more about using advanced rebalancing schemes with Citus, please contact us at https://citusdata.com/about/contact_us
