diff --git a/src/test/regress/expected/multi_expanded_modifications.out b/src/test/regress/expected/multi_expanded_modifications.out deleted file mode 100644 index 74379077d..000000000 --- a/src/test/regress/expected/multi_expanded_modifications.out +++ /dev/null @@ -1,30 +0,0 @@ -CREATE TABLE modifications ( - key VARCHAR, - counter INT, - time TIMESTAMPTZ -); -SELECT master_create_distributed_table('modifications', 'key', 'hash'); - master_create_distributed_table ---------------------------------- - -(1 row) - -SELECT master_create_worker_shards('modifications', 4, 1); - master_create_worker_shards ------------------------------ - -(1 row) - -INSERT INTO modifications VALUES ('one', 0, null); -UPDATE modifications SET counter = counter + 1; -ERROR: distributed modifications must target exactly one shard -UPDATE modifications SET counter = counter + 1 WHERE key = 'one'; -UPDATE modifications SET time = now() WHERE key = 'one'; -ERROR: cannot plan sharded modification containing values which are not constants or constant expressions -SELECT * FROM modifications; - key | counter | time ------+---------+------ - one | 1 | -(1 row) - -DROP TABLE modifications; diff --git a/src/test/regress/expected/multi_modifications.out b/src/test/regress/expected/multi_modifications.out index d1df70c83..e4aef6a1a 100644 --- a/src/test/regress/expected/multi_modifications.out +++ b/src/test/regress/expected/multi_modifications.out @@ -317,6 +317,11 @@ WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *) UPDATE limit_orders SET symbol = 'GM'; ERROR: cannot perform distributed planning for the given modification DETAIL: Common table expressions are not supported in distributed modifications. +-- updates referencing a column are supported +UPDATE limit_orders SET bidder_id = bidder_id + 1 WHERE id = 246; +-- updates referencing an unpure function 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 -- cursors are not supported UPDATE limit_orders SET symbol = 'GM' WHERE CURRENT OF cursor_name; ERROR: distributed modifications must target exactly one shard diff --git a/src/test/regress/multi_schedule b/src/test/regress/multi_schedule index 9b455ece1..546d69b11 100644 --- a/src/test/regress/multi_schedule +++ b/src/test/regress/multi_schedule @@ -141,9 +141,3 @@ test: multi_large_shardid # multi_drop_extension makes sure we can safely drop and recreate the extension # ---------- test: multi_drop_extension - -# ---------- -# multi_expanded_modifications includes some tests that we can reference columns in -# UPDATEs -# ---------- -test: multi_expanded_modifications diff --git a/src/test/regress/sql/multi_expanded_modifications.sql b/src/test/regress/sql/multi_expanded_modifications.sql deleted file mode 100644 index 8d475f271..000000000 --- a/src/test/regress/sql/multi_expanded_modifications.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE modifications ( - key VARCHAR, - counter INT, - time TIMESTAMPTZ -); -SELECT master_create_distributed_table('modifications', 'key', 'hash'); -SELECT master_create_worker_shards('modifications', 4, 1); - -INSERT INTO modifications VALUES ('one', 0, null); - -UPDATE modifications SET counter = counter + 1; - -UPDATE modifications SET counter = counter + 1 WHERE key = 'one'; - -UPDATE modifications SET time = now() WHERE key = 'one'; - -SELECT * FROM modifications; - -DROP TABLE modifications; diff --git a/src/test/regress/sql/multi_modifications.sql b/src/test/regress/sql/multi_modifications.sql index a619fdf28..a04091d7b 100644 --- a/src/test/regress/sql/multi_modifications.sql +++ b/src/test/regress/sql/multi_modifications.sql @@ -235,5 +235,11 @@ UPDATE limit_orders SET symbol = 'GM' WHERE id = 246 RETURNING *; WITH deleted_orders AS (INSERT INTO limit_orders DEFAULT VALUES RETURNING *) UPDATE limit_orders SET symbol = 'GM'; +-- updates referencing a column are supported +UPDATE limit_orders SET bidder_id = bidder_id + 1 WHERE id = 246; + +-- updates referencing an unpure function are unsupported +UPDATE limit_orders SET placed_at = now() WHERE id = 246; + -- cursors are not supported UPDATE limit_orders SET symbol = 'GM' WHERE CURRENT OF cursor_name;