summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/union.out16
-rw-r--r--src/test/regress/sql/union.sql9
2 files changed, 24 insertions, 1 deletions
diff --git a/src/test/regress/expected/union.out b/src/test/regress/expected/union.out
index f046e522dea..64cebe48336 100644
--- a/src/test/regress/expected/union.out
+++ b/src/test/regress/expected/union.out
@@ -1453,3 +1453,19 @@ inner join tenk2 t2 on t1.tenthous = t2.tenthous
-> Result
(8 rows)
+-- Ensure there is no problem if cheapest_startup_path is NULL
+explain (costs off)
+select * from tenk1 t1
+left join lateral
+ (select t1.tenthous from tenk2 t2 union all (values(1)))
+on true limit 1;
+ QUERY PLAN
+-------------------------------------------------------------------
+ Limit
+ -> Nested Loop Left Join
+ -> Seq Scan on tenk1 t1
+ -> Append
+ -> Index Only Scan using tenk2_hundred on tenk2 t2
+ -> Result
+(6 rows)
+
diff --git a/src/test/regress/sql/union.sql b/src/test/regress/sql/union.sql
index d65ca9f86de..599013e7c9d 100644
--- a/src/test/regress/sql/union.sql
+++ b/src/test/regress/sql/union.sql
@@ -550,4 +550,11 @@ explain (costs off)
select t1.unique1 from tenk1 t1
inner join tenk2 t2 on t1.tenthous = t2.tenthous
union all
-(values(1)) limit 1; \ No newline at end of file
+(values(1)) limit 1;
+
+-- Ensure there is no problem if cheapest_startup_path is NULL
+explain (costs off)
+select * from tenk1 t1
+left join lateral
+ (select t1.tenthous from tenk2 t2 union all (values(1)))
+on true limit 1;