Fix some regression tests for d3d55ce571

Add missing (cost off) to explain.
This commit is contained in:
Alexander Korotkov 2023-10-25 14:53:14 +03:00
parent d3d55ce571
commit 9ba9c7074f
2 changed files with 24 additions and 18 deletions

View File

@ -6729,30 +6729,33 @@ SELECT * FROM emp1 e1, emp1 e2 WHERE e1.id = e2.id AND e2.code <> e1.code;
-- Shuffle self-joined relations. Only in the case of iterative deletion
-- attempts explains of these queries will be identical.
CREATE UNIQUE INDEX ON emp1((id*id));
explain SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
explain (costs off)
SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
WHERE c1.id=c2.id AND c1.id*c2.id=c3.id*c3.id;
QUERY PLAN
-----------------------------------------------------------------
Aggregate (cost=43.84..43.85 rows=1 width=8)
-> Seq Scan on emp1 c3 (cost=0.00..38.25 rows=2237 width=0)
QUERY PLAN
----------------------------------------------------------------
Aggregate
-> Seq Scan on emp1 c3
Filter: ((id IS NOT NULL) AND ((id * id) IS NOT NULL))
(3 rows)
explain SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
explain (costs off)
SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
WHERE c1.id=c3.id AND c1.id*c3.id=c2.id*c2.id;
QUERY PLAN
-----------------------------------------------------------------
Aggregate (cost=43.84..43.85 rows=1 width=8)
-> Seq Scan on emp1 c3 (cost=0.00..38.25 rows=2237 width=0)
QUERY PLAN
----------------------------------------------------------------
Aggregate
-> Seq Scan on emp1 c3
Filter: ((id IS NOT NULL) AND ((id * id) IS NOT NULL))
(3 rows)
explain SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
explain (costs off)
SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
WHERE c3.id=c2.id AND c3.id*c2.id=c1.id*c1.id;
QUERY PLAN
-----------------------------------------------------------------
Aggregate (cost=43.84..43.85 rows=1 width=8)
-> Seq Scan on emp1 c3 (cost=0.00..38.25 rows=2237 width=0)
QUERY PLAN
----------------------------------------------------------------
Aggregate
-> Seq Scan on emp1 c3
Filter: ((id IS NOT NULL) AND ((id * id) IS NOT NULL))
(3 rows)

View File

@ -2563,11 +2563,14 @@ SELECT * FROM emp1 e1, emp1 e2 WHERE e1.id = e2.id AND e2.code <> e1.code;
-- Shuffle self-joined relations. Only in the case of iterative deletion
-- attempts explains of these queries will be identical.
CREATE UNIQUE INDEX ON emp1((id*id));
explain SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
explain (costs off)
SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
WHERE c1.id=c2.id AND c1.id*c2.id=c3.id*c3.id;
explain SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
explain (costs off)
SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
WHERE c1.id=c3.id AND c1.id*c3.id=c2.id*c2.id;
explain SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
explain (costs off)
SELECT count(*) FROM emp1 c1, emp1 c2, emp1 c3
WHERE c3.id=c2.id AND c3.id*c2.id=c1.id*c1.id;
-- We can remove the join even if we find the join can't duplicate rows and