mirror of https://github.com/citusdata/citus.git
Add some more tests
parent
8b43ce8b7c
commit
693a797896
|
@ -317,8 +317,24 @@ WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *)
|
||||||
UPDATE limit_orders SET symbol = 'GM';
|
UPDATE limit_orders SET symbol = 'GM';
|
||||||
ERROR: cannot perform distributed planning for the given modification
|
ERROR: cannot perform distributed planning for the given modification
|
||||||
DETAIL: Common table expressions are not supported in distributed modifications.
|
DETAIL: Common table expressions are not supported in distributed modifications.
|
||||||
|
SELECT symbol, bidder_id FROM limit_orders WHERE id = 246;
|
||||||
|
symbol | bidder_id
|
||||||
|
--------+-----------
|
||||||
|
GM | 18
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
-- updates referencing just a var are supported
|
||||||
|
UPDATE limit_orders SET bidder_id = id WHERE id = 246;
|
||||||
-- updates referencing a column are supported
|
-- updates referencing a column are supported
|
||||||
UPDATE limit_orders SET bidder_id = bidder_id + 1 WHERE id = 246;
|
UPDATE limit_orders SET bidder_id = bidder_id + 1 WHERE id = 246;
|
||||||
|
-- pure functions are allowed
|
||||||
|
UPDATE limit_orders SET symbol = LOWER(symbol) WHERE id = 246;
|
||||||
|
SELECT symbol, bidder_id FROM limit_orders WHERE id = 246;
|
||||||
|
symbol | bidder_id
|
||||||
|
--------+-----------
|
||||||
|
gm | 247
|
||||||
|
(1 row)
|
||||||
|
|
||||||
-- updates referencing an unpure function are unsupported
|
-- updates referencing an unpure function are unsupported
|
||||||
UPDATE limit_orders SET placed_at = now() WHERE id = 246;
|
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: cannot plan sharded modification containing values which are not constants or constant expressions
|
||||||
|
|
|
@ -235,9 +235,19 @@ UPDATE limit_orders SET symbol = 'GM' WHERE id = 246 RETURNING *;
|
||||||
WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *)
|
WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *)
|
||||||
UPDATE limit_orders SET symbol = 'GM';
|
UPDATE limit_orders SET symbol = 'GM';
|
||||||
|
|
||||||
|
SELECT symbol, bidder_id FROM limit_orders WHERE id = 246;
|
||||||
|
|
||||||
|
-- updates referencing just a var are supported
|
||||||
|
UPDATE limit_orders SET bidder_id = id WHERE id = 246;
|
||||||
|
|
||||||
-- updates referencing a column are supported
|
-- updates referencing a column are supported
|
||||||
UPDATE limit_orders SET bidder_id = bidder_id + 1 WHERE id = 246;
|
UPDATE limit_orders SET bidder_id = bidder_id + 1 WHERE id = 246;
|
||||||
|
|
||||||
|
-- pure functions are allowed
|
||||||
|
UPDATE limit_orders SET symbol = LOWER(symbol) WHERE id = 246;
|
||||||
|
|
||||||
|
SELECT symbol, bidder_id FROM limit_orders WHERE id = 246;
|
||||||
|
|
||||||
-- updates referencing an unpure function are unsupported
|
-- updates referencing an unpure function are unsupported
|
||||||
UPDATE limit_orders SET placed_at = now() WHERE id = 246;
|
UPDATE limit_orders SET placed_at = now() WHERE id = 246;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue