Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5012551

Browse files
committed
Add a simple test case covering a join against an inheritance tree,
since we're evidently not testing that at all right now :-(
1 parent f959390 commit 5012551

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/test/regress/expected/join.out

+13
Original file line numberDiff line numberDiff line change
@@ -2209,6 +2209,19 @@ SELECT * FROM t3;
22092209
---+---
22102210
(0 rows)
22112211

2212+
-- Test join against inheritance tree
2213+
create temp table t2a () inherits (t2);
2214+
insert into t2a values (200, 2001);
2215+
select * from t1 left join t2 on (t1.a = t2.a);
2216+
a | b | a | b
2217+
-----+------+-----+------
2218+
5 | 10 | |
2219+
15 | 20 | |
2220+
100 | 100 | |
2221+
200 | 1000 | 200 | 2000
2222+
200 | 1000 | 200 | 2001
2223+
(5 rows)
2224+
22122225
--
22132226
-- regression test for 8.1 merge right join bug
22142227
--

src/test/regress/sql/join.sql

+8
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,14 @@ SELECT * FROM t3;
389389
DELETE FROM t3 USING t3 t3_other WHERE t3.x = t3_other.x AND t3.y = t3_other.y;
390390
SELECT * FROM t3;
391391

392+
-- Test join against inheritance tree
393+
394+
create temp table t2a () inherits (t2);
395+
396+
insert into t2a values (200, 2001);
397+
398+
select * from t1 left join t2 on (t1.a = t2.a);
399+
392400
--
393401
-- regression test for 8.1 merge right join bug
394402
--

0 commit comments

Comments
 (0)