Skip to content

Commit

Permalink
Refactor SQL syntax in issue 7891 tests for consistency and clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
m3hm3t committed Feb 25, 2025
1 parent afe0155 commit 93f1d13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions src/test/regress/expected/issue_7891.out
Original file line number Diff line number Diff line change
Expand Up @@ -207,25 +207,25 @@ SELECT 't2_ref after UPDATE' AS label, * FROM t2_ref;
(1 row)

-- Creating an additional reference table t3_ref to confirm subquery logic
create table t3_ref(pkey int, c15 text);
select create_reference_table('t3_ref');
CREATE TABLE t3_ref(pkey INT, c15 TEXT);
SELECT create_reference_table('t3_ref');
create_reference_table
---------------------------------------------------------------------

(1 row)

insert into t3_ref values (99, 'Initial Data');
INSERT INTO t3_ref VALUES (99, 'Initial Data');
UPDATE t2_ref SET c15 = '2088-08-08 00:00:00'::timestamp WHERE EXISTS ( SELECT 1 FROM t3_ref);
SELECT 't2_ref after UPDATE' AS label, * FROM t2_ref;
label | vkey | pkey | c15
---------------------------------------------------------------------
t2_ref after UPDATE | 14 | 24000 | Sun Aug 08 00:00:00 2088
(1 row)

SELECT citus_remove_node('localhost', :worker_2_port);
citus_remove_node
SELECT 1 FROM citus_remove_node('localhost', :worker_2_port);
?column?
---------------------------------------------------------------------

1
(1 row)

SELECT 't2_ref after UPDATE - without worker 2' AS label, * FROM t2_ref;
Expand All @@ -240,10 +240,10 @@ SELECT 1 FROM citus_add_node('localhost', :worker_2_port);
1
(1 row)

SELECT citus_remove_node('localhost', :worker_1_port);
citus_remove_node
SELECT 1 FROM citus_remove_node('localhost', :worker_1_port);
?column?
---------------------------------------------------------------------

1
(1 row)

SELECT 't2_ref after UPDATE - without worker 1' AS label, * FROM t2_ref;
Expand Down
10 changes: 5 additions & 5 deletions src/test/regress/sql/issue_7891.sql
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,20 @@ UPDATE t2_ref
SELECT 't2_ref after UPDATE' AS label, * FROM t2_ref;

-- Creating an additional reference table t3_ref to confirm subquery logic
create table t3_ref(pkey int, c15 text);
select create_reference_table('t3_ref');
insert into t3_ref values (99, 'Initial Data');
CREATE TABLE t3_ref(pkey INT, c15 TEXT);
SELECT create_reference_table('t3_ref');
INSERT INTO t3_ref VALUES (99, 'Initial Data');

UPDATE t2_ref SET c15 = '2088-08-08 00:00:00'::timestamp WHERE EXISTS ( SELECT 1 FROM t3_ref);

SELECT 't2_ref after UPDATE' AS label, * FROM t2_ref;

SELECT citus_remove_node('localhost', :worker_2_port);
SELECT 1 FROM citus_remove_node('localhost', :worker_2_port);

SELECT 't2_ref after UPDATE - without worker 2' AS label, * FROM t2_ref;

SELECT 1 FROM citus_add_node('localhost', :worker_2_port);
SELECT citus_remove_node('localhost', :worker_1_port);
SELECT 1 FROM citus_remove_node('localhost', :worker_1_port);

SELECT 't2_ref after UPDATE - without worker 1' AS label, * FROM t2_ref;

Expand Down

0 comments on commit 93f1d13

Please sign in to comment.