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

Lines changed: 13 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy