mirror of https://github.com/citusdata/citus.git
Update error message
parent
72184f3f8d
commit
50484331a6
|
@ -354,8 +354,8 @@ ErrorIfModifyQueryNotSupported(Query *queryTree)
|
|||
if (hasNonConstTargetEntryExprs || hasNonConstQualExprs)
|
||||
{
|
||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot plan sharded modification containing values "
|
||||
"which are not constants or constant expressions")));
|
||||
errmsg("functions used in modification queries on distributed "
|
||||
"tables must be marked IMMUTABLE")));
|
||||
}
|
||||
|
||||
if (specifiesPartitionValue)
|
||||
|
|
|
@ -155,16 +155,16 @@ SET client_min_messages TO DEFAULT;
|
|||
-- commands with non-constant partition values are unsupported
|
||||
INSERT INTO limit_orders VALUES (random() * 100, 'ORCL', 152, '2011-08-25 11:50:45',
|
||||
'sell', 0.58);
|
||||
ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||
ERROR: functions used in modification queries on distributed tables must be marked IMMUTABLE
|
||||
-- commands with expressions that cannot be collapsed are unsupported
|
||||
INSERT INTO limit_orders VALUES (2036, 'GOOG', 5634, now(), 'buy', random());
|
||||
ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||
ERROR: functions used in modification queries on distributed tables must be marked IMMUTABLE
|
||||
-- commands with mutable functions in their quals
|
||||
DELETE FROM limit_orders WHERE id = 246 AND bidder_id = (random() * 1000);
|
||||
ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||
ERROR: functions used in modification queries on distributed tables must be marked IMMUTABLE
|
||||
-- commands with mutable but non-volatilte functions(ie: stable func.) in their quals
|
||||
DELETE FROM limit_orders WHERE id = 246 AND placed_at = current_timestamp;
|
||||
ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||
ERROR: functions used in modification queries on distributed tables must be marked IMMUTABLE
|
||||
-- commands with multiple rows are unsupported
|
||||
INSERT INTO limit_orders VALUES (DEFAULT), (DEFAULT);
|
||||
ERROR: cannot perform distributed planning for the given modification
|
||||
|
@ -337,7 +337,7 @@ SELECT symbol, bidder_id FROM limit_orders WHERE id = 246;
|
|||
|
||||
-- updates referencing non-IMMUTABLE functions are unsupported
|
||||
UPDATE limit_orders SET placed_at = now() WHERE id = 246;
|
||||
ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||
ERROR: functions used in modification queries on distributed tables must be marked IMMUTABLE
|
||||
-- cursors are not supported
|
||||
UPDATE limit_orders SET symbol = 'GM' WHERE CURRENT OF cursor_name;
|
||||
ERROR: distributed modifications must target exactly one shard
|
||||
|
|
|
@ -223,15 +223,15 @@ DETAIL: Subqueries are not supported in distributed modifications.
|
|||
-- non mutable function call in the SET
|
||||
INSERT INTO upsert_test (part_key, other_col) VALUES (1, 1) ON CONFLICT (part_key) DO
|
||||
UPDATE SET other_col = random()::int;
|
||||
ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||
ERROR: functions used in modification queries on distributed tables must be marked IMMUTABLE
|
||||
-- non mutable function call in the WHERE
|
||||
INSERT INTO upsert_test (part_key, other_col) VALUES (1, 1) ON CONFLICT (part_key) DO
|
||||
UPDATE SET other_col = 5 WHERE upsert_test.other_col = random()::int;
|
||||
ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||
ERROR: functions used in modification queries on distributed tables must be marked IMMUTABLE
|
||||
-- non mutable function call in the arbiter WHERE
|
||||
INSERT INTO upsert_test (part_key, other_col) VALUES (1, 1) ON CONFLICT (part_key) WHERE part_key = random()::int
|
||||
DO UPDATE SET other_col = 5;
|
||||
ERROR: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||
ERROR: functions used in modification queries on distributed tables must be marked IMMUTABLE
|
||||
-- error out on attempt to update the partition key
|
||||
INSERT INTO upsert_test (part_key, other_col) VALUES (1, 1) ON CONFLICT (part_key) DO
|
||||
UPDATE SET part_key = 15;
|
||||
|
|
Loading…
Reference in New Issue