From 501255114d0266a599c2b52fdf15fe8cac0a4650 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 13 Aug 2009 17:14:38 +0000 Subject: [PATCH] Add a simple test case covering a join against an inheritance tree, since we're evidently not testing that at all right now :-( --- src/test/regress/expected/join.out | 13 +++++++++++++ src/test/regress/sql/join.sql | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out index afb4f974e7..c8c9b960b5 100644 --- a/src/test/regress/expected/join.out +++ b/src/test/regress/expected/join.out @@ -2209,6 +2209,19 @@ SELECT * FROM t3; ---+--- (0 rows) +-- Test join against inheritance tree +create temp table t2a () inherits (t2); +insert into t2a values (200, 2001); +select * from t1 left join t2 on (t1.a = t2.a); + a | b | a | b +-----+------+-----+------ + 5 | 10 | | + 15 | 20 | | + 100 | 100 | | + 200 | 1000 | 200 | 2000 + 200 | 1000 | 200 | 2001 +(5 rows) + -- -- regression test for 8.1 merge right join bug -- diff --git a/src/test/regress/sql/join.sql b/src/test/regress/sql/join.sql index 123d1f3015..1516e09b56 100644 --- a/src/test/regress/sql/join.sql +++ b/src/test/regress/sql/join.sql @@ -389,6 +389,14 @@ SELECT * FROM t3; DELETE FROM t3 USING t3 t3_other WHERE t3.x = t3_other.x AND t3.y = t3_other.y; SELECT * FROM t3; +-- Test join against inheritance tree + +create temp table t2a () inherits (t2); + +insert into t2a values (200, 2001); + +select * from t1 left join t2 on (t1.a = t2.a); + -- -- regression test for 8.1 merge right join bug -- -- 2.40.0