mirror of https://github.com/citusdata/citus.git
Improve wording of an error message
parent
c8368e7929
commit
903489c763
|
@ -2256,8 +2256,8 @@ EnsureCoordinatorInitiatedOperation(void)
|
||||||
GetLocalGroupId() == COORDINATOR_GROUP_ID)
|
GetLocalGroupId() == COORDINATOR_GROUP_ID)
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||||
errmsg("This is an internal function that only Citus "
|
errmsg("This is an internal Citus function can only be "
|
||||||
"requires to use in a distributed transaction")));
|
"used in a distributed transaction")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ SET search_path TO metadata_sync_helpers;
|
||||||
CREATE TABLE test(col_1 int);
|
CREATE TABLE test(col_1 int);
|
||||||
-- not in a distributed transaction
|
-- not in a distributed transaction
|
||||||
SELECT citus_internal_add_partition_metadata ('test'::regclass, 'h', 'col_1', 0, 's');
|
SELECT citus_internal_add_partition_metadata ('test'::regclass, 'h', 'col_1', 0, 's');
|
||||||
ERROR: This is an internal function that only Citus requires to use in a distributed transaction
|
ERROR: This is an internal Citus function can only be used in a distributed transaction
|
||||||
-- in a distributed transaction, but the application name is not Citus
|
-- in a distributed transaction, but the application name is not Citus
|
||||||
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||||
SELECT assign_distributed_transaction_id(0, 8, '2021-07-09 15:41:55.542377+02');
|
SELECT assign_distributed_transaction_id(0, 8, '2021-07-09 15:41:55.542377+02');
|
||||||
|
@ -23,7 +23,7 @@ BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT citus_internal_add_partition_metadata ('test'::regclass, 'h', 'col_1', 0, 's');
|
SELECT citus_internal_add_partition_metadata ('test'::regclass, 'h', 'col_1', 0, 's');
|
||||||
ERROR: This is an internal function that only Citus requires to use in a distributed transaction
|
ERROR: This is an internal Citus function can only be used in a distributed transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- in a distributed transaction and the application name is Citus
|
-- in a distributed transaction and the application name is Citus
|
||||||
-- but we are on the coordinator, so still not allowed
|
-- but we are on the coordinator, so still not allowed
|
||||||
|
@ -36,7 +36,7 @@ BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||||
|
|
||||||
SET application_name to 'citus';
|
SET application_name to 'citus';
|
||||||
SELECT citus_internal_add_partition_metadata ('test'::regclass, 'h', 'col_1', 0, 's');
|
SELECT citus_internal_add_partition_metadata ('test'::regclass, 'h', 'col_1', 0, 's');
|
||||||
ERROR: This is an internal function that only Citus requires to use in a distributed transaction
|
ERROR: This is an internal Citus function can only be used in a distributed transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- connect back as super user, and then connect to the worker
|
-- connect back as super user, and then connect to the worker
|
||||||
-- with the superuser to make sure we can ingest metadata with
|
-- with the superuser to make sure we can ingest metadata with
|
||||||
|
@ -908,7 +908,7 @@ BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||||
WITH shard_data(shardid)
|
WITH shard_data(shardid)
|
||||||
AS (VALUES (1420007))
|
AS (VALUES (1420007))
|
||||||
SELECT citus_internal_delete_shard_metadata(shardid) FROM shard_data;
|
SELECT citus_internal_delete_shard_metadata(shardid) FROM shard_data;
|
||||||
ERROR: This is an internal function that only Citus requires to use in a distributed transaction
|
ERROR: This is an internal Citus function can only be used in a distributed transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-- the user cannot delete non-existing shards
|
-- the user cannot delete non-existing shards
|
||||||
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||||
|
|
Loading…
Reference in New Issue