summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/join.out22
-rw-r--r--src/test/regress/sql/join.sql6
2 files changed, 28 insertions, 0 deletions
diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out
index e73ba93ca3c..8d7bd937a77 100644
--- a/src/test/regress/expected/join.out
+++ b/src/test/regress/expected/join.out
@@ -6203,6 +6203,28 @@ select * from
Output: 3
(11 rows)
+-- a new postponed-quals issue (bug #17768)
+explain (costs off)
+select * from int4_tbl t1,
+ lateral (select * from int4_tbl t2 inner join int4_tbl t3 on t1.f1 = 1
+ inner join (int4_tbl t4 left join int4_tbl t5 on true) on true) ss;
+ QUERY PLAN
+-------------------------------------------------
+ Nested Loop Left Join
+ -> Nested Loop
+ -> Nested Loop
+ -> Nested Loop
+ -> Seq Scan on int4_tbl t1
+ Filter: (f1 = 1)
+ -> Seq Scan on int4_tbl t2
+ -> Materialize
+ -> Seq Scan on int4_tbl t3
+ -> Materialize
+ -> Seq Scan on int4_tbl t4
+ -> Materialize
+ -> Seq Scan on int4_tbl t5
+(13 rows)
+
-- check dummy rels with lateral references (bug #15694)
explain (verbose, costs off)
select * from int8_tbl i8 left join lateral
diff --git a/src/test/regress/sql/join.sql b/src/test/regress/sql/join.sql
index ed26ffd8a86..9f55147be78 100644
--- a/src/test/regress/sql/join.sql
+++ b/src/test/regress/sql/join.sql
@@ -2159,6 +2159,12 @@ select * from
select * from (select 3 as z offset 0) z where z.z = x.x
) zz on zz.z = y.y;
+-- a new postponed-quals issue (bug #17768)
+explain (costs off)
+select * from int4_tbl t1,
+ lateral (select * from int4_tbl t2 inner join int4_tbl t3 on t1.f1 = 1
+ inner join (int4_tbl t4 left join int4_tbl t5 on true) on true) ss;
+
-- check dummy rels with lateral references (bug #15694)
explain (verbose, costs off)
select * from int8_tbl i8 left join lateral