diff --git a/src/test/regress/expected/issue_7676.out b/src/test/regress/expected/issue_7676.out deleted file mode 100644 index 08651816a..000000000 --- a/src/test/regress/expected/issue_7676.out +++ /dev/null @@ -1,35 +0,0 @@ --- https://github.com/citusdata/citus/issues/7676 -CREATE TABLE test_ref_multiexpr ( - id bigint primary key - , col_int integer - , col_bool bool - , col_text text - , col_timestamp timestamp - ); -select create_reference_table('test_ref_multiexpr'); - create_reference_table ---------------------------------------------------------------------- - -(1 row) - -/* TODO how to ensure in test that 'now()' is correctly pre-executed */ -insert into test_ref_multiexpr values (1, 1, true, 'one', now()); -update test_ref_multiexpr -SET (col_timestamp) - = (SELECT now()) -returning id, col_int, col_bool; - id | col_int | col_bool ---------------------------------------------------------------------- - 1 | 1 | t -(1 row) - -update test_ref_multiexpr -SET (col_bool, col_timestamp) - = (SELECT true, now()) -returning id, col_int, col_bool; - id | col_int | col_bool ---------------------------------------------------------------------- - 1 | 1 | t -(1 row) - -DROP TABLE test_ref_multiexpr; diff --git a/src/test/regress/expected/multi_modifications.out b/src/test/regress/expected/multi_modifications.out index 887003a97..15b84a1de 100644 --- a/src/test/regress/expected/multi_modifications.out +++ b/src/test/regress/expected/multi_modifications.out @@ -812,6 +812,42 @@ SELECT * FROM app_analytics_events ORDER BY id; (2 rows) DROP TABLE app_analytics_events; +-- test function call in UPDATE SET +-- https://github.com/citusdata/citus/issues/7676 +CREATE TABLE test_ref_multiexpr ( + id bigint primary key + , col_int integer + , col_bool bool + , col_text text + , col_timestamp timestamp + ); +SELECT create_reference_table('test_ref_multiexpr'); + create_reference_table +--------------------------------------------------------------------- + +(1 row) + +/* TODO how to ensure in test that 'now()' is correctly pre-executed */ +INSERT INTO test_ref_multiexpr VALUES (1, 1, true, 'one', now()); +UPDATE test_ref_multiexpr +SET (col_timestamp) + = (SELECT now()) +RETURNING id, col_int, col_bool; + id | col_int | col_bool +--------------------------------------------------------------------- + 1 | 1 | t +(1 row) + +UPDATE test_ref_multiexpr +SET (col_bool, col_timestamp) + = (SELECT true, now()) +RETURNING id, col_int, col_bool; + id | col_int | col_bool +--------------------------------------------------------------------- + 1 | 1 | t +(1 row) + +DROP TABLE test_ref_multiexpr; -- Test multi-row insert with serial in a non-partition column CREATE TABLE app_analytics_events (id int, app_id serial, name text); SELECT create_distributed_table('app_analytics_events', 'id'); diff --git a/src/test/regress/multi_schedule b/src/test/regress/multi_schedule index 42355ef8c..0fa54bb38 100644 --- a/src/test/regress/multi_schedule +++ b/src/test/regress/multi_schedule @@ -103,7 +103,7 @@ test: multi_dropped_column_aliases foreign_key_restriction_enforcement test: binary_protocol test: alter_table_set_access_method test: alter_distributed_table -test: issue_5248 issue_5099 issue_5763 issue_6543 issue_6758 issue_7477 issue_7676 +test: issue_5248 issue_5099 issue_5763 issue_6543 issue_6758 issue_7477 test: object_propagation_debug test: undistribute_table test: run_command_on_all_nodes diff --git a/src/test/regress/sql/issue_7676.sql b/src/test/regress/sql/issue_7676.sql deleted file mode 100644 index 5ff912491..000000000 --- a/src/test/regress/sql/issue_7676.sql +++ /dev/null @@ -1,24 +0,0 @@ --- https://github.com/citusdata/citus/issues/7676 -CREATE TABLE test_ref_multiexpr ( - id bigint primary key - , col_int integer - , col_bool bool - , col_text text - , col_timestamp timestamp - ); -select create_reference_table('test_ref_multiexpr'); - -/* TODO how to ensure in test that 'now()' is correctly pre-executed */ -insert into test_ref_multiexpr values (1, 1, true, 'one', now()); - -update test_ref_multiexpr -SET (col_timestamp) - = (SELECT now()) -returning id, col_int, col_bool; - -update test_ref_multiexpr -SET (col_bool, col_timestamp) - = (SELECT true, now()) -returning id, col_int, col_bool; - -DROP TABLE test_ref_multiexpr; diff --git a/src/test/regress/sql/multi_modifications.sql b/src/test/regress/sql/multi_modifications.sql index 7977325ea..25282c996 100644 --- a/src/test/regress/sql/multi_modifications.sql +++ b/src/test/regress/sql/multi_modifications.sql @@ -505,6 +505,32 @@ VALUES (104, 'Wayz'), (105, 'Mynt') RETURNING *; SELECT * FROM app_analytics_events ORDER BY id; DROP TABLE app_analytics_events; +-- test function call in UPDATE SET +-- https://github.com/citusdata/citus/issues/7676 +CREATE TABLE test_ref_multiexpr ( + id bigint primary key + , col_int integer + , col_bool bool + , col_text text + , col_timestamp timestamp + ); +SELECT create_reference_table('test_ref_multiexpr'); + +/* TODO how to ensure in test that 'now()' is correctly pre-executed */ +INSERT INTO test_ref_multiexpr VALUES (1, 1, true, 'one', now()); + +UPDATE test_ref_multiexpr +SET (col_timestamp) + = (SELECT now()) +RETURNING id, col_int, col_bool; + +UPDATE test_ref_multiexpr +SET (col_bool, col_timestamp) + = (SELECT true, now()) +RETURNING id, col_int, col_bool; + +DROP TABLE test_ref_multiexpr; + -- Test multi-row insert with serial in a non-partition column CREATE TABLE app_analytics_events (id int, app_id serial, name text); SELECT create_distributed_table('app_analytics_events', 'id');