Skip to content

Commit

Permalink
Remove redundant reference table creation and related queries from is…
Browse files Browse the repository at this point in the history
…sue 7891 tests for clarity
  • Loading branch information
m3hm3t committed Feb 25, 2025
1 parent 245d839 commit 0dec699
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 72 deletions.
52 changes: 0 additions & 52 deletions src/test/regress/expected/issue_7891.out
Original file line number Diff line number Diff line change
Expand Up @@ -206,58 +206,6 @@ SELECT 't2_ref after UPDATE' AS label, * FROM t2_ref;
t2_ref after UPDATE | 14 | 24000 | Thu Jan 01 00:00:00 2099
(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_reference_table
---------------------------------------------------------------------

(1 row)

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 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;
label | vkey | pkey | c15
---------------------------------------------------------------------
t2_ref after UPDATE - without worker 2 | 14 | 24000 | Sun Aug 08 00:00:00 2088
(1 row)

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

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;
label | vkey | pkey | c15
---------------------------------------------------------------------
t2_ref after UPDATE - without worker 1 | 14 | 24000 | Sun Aug 08 00:00:00 2088
(1 row)

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

-- Cleanup
SET client_min_messages TO WARNING;
DROP SCHEMA issue_7891 CASCADE;
20 changes: 0 additions & 20 deletions src/test/regress/sql/issue_7891.sql
Original file line number Diff line number Diff line change
Expand Up @@ -164,26 +164,6 @@ 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');

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 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 1 FROM citus_remove_node('localhost', :worker_1_port);

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

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

-- Cleanup
SET client_min_messages TO WARNING;
DROP SCHEMA issue_7891 CASCADE;

0 comments on commit 0dec699

Please sign in to comment.