Refactor SQL syntax in issue 7891 tests for consistency and clarity

pull/7897/head
Mehmet Yilmaz 2025-02-24 14:26:28 +00:00 committed by Mehmet YILMAZ
parent afe0155eac
commit 93f1d13d18
2 changed files with 14 additions and 14 deletions

View File

@ -207,14 +207,14 @@ 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
@ -222,10 +222,10 @@ SELECT 't2_ref after UPDATE' AS label, * FROM t2_ref;
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;
@ -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;

View File

@ -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;