aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/expected/subselect.out
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/expected/subselect.out')
-rw-r--r--src/test/regress/expected/subselect.out29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/regress/expected/subselect.out b/src/test/regress/expected/subselect.out
index 39c12f91e8c..ce15af7378b 100644
--- a/src/test/regress/expected/subselect.out
+++ b/src/test/regress/expected/subselect.out
@@ -710,3 +710,32 @@ select exists(select * from nocolumns);
f
(1 row)
+--
+-- Check sane behavior with nested IN SubLinks
+--
+explain (verbose, costs off)
+select * from int4_tbl where
+ (case when f1 in (select unique1 from tenk1 a) then f1 else null end) in
+ (select ten from tenk1 b);
+ QUERY PLAN
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ Nested Loop Semi Join
+ Output: int4_tbl.f1
+ Join Filter: (CASE WHEN (hashed SubPlan 1) THEN int4_tbl.f1 ELSE NULL::integer END = b.ten)
+ -> Seq Scan on public.int4_tbl
+ Output: int4_tbl.f1
+ -> Seq Scan on public.tenk1 b
+ Output: b.unique1, b.unique2, b.two, b.four, b.ten, b.twenty, b.hundred, b.thousand, b.twothousand, b.fivethous, b.tenthous, b.odd, b.even, b.stringu1, b.stringu2, b.string4
+ SubPlan 1
+ -> Index Only Scan using tenk1_unique1 on public.tenk1 a
+ Output: a.unique1
+(10 rows)
+
+select * from int4_tbl where
+ (case when f1 in (select unique1 from tenk1 a) then f1 else null end) in
+ (select ten from tenk1 b);
+ f1
+----
+ 0
+(1 row)
+