]> granicus.if.org Git - postgresql/blobdiff - src/test/regress/sql/join.sql
RESET SESSION, plus related new DDL commands. Patch from Marko Kreen,
[postgresql] / src / test / regress / sql / join.sql
index 149cdadc19084714c4f9ae9129f78198890b69a5..71208d2d2d83822360030d32e33e1808b973de6d 100644 (file)
@@ -334,6 +334,15 @@ select count(*) from tenk1 a where unique1 in
   (select unique1 from tenk1 b join tenk1 c using (unique1)
    where b.unique2 = 42);
 
+--
+-- regression test: check for failure to generate a plan with multiple
+-- degenerate IN clauses
+--
+select count(*) from tenk1 x where
+  x.unique1 in (select a.f1 from int4_tbl a,float8_tbl b where a.f1=b.f1) and
+  x.unique1 = 0 and
+  x.unique1 in (select aa.f1 from int4_tbl aa,float8_tbl bb where aa.f1=bb.f1);
+
 
 --
 -- Clean up