]> granicus.if.org Git - postgresql/commit
Check we don't misoptimize a NOT IN where the subquery returns no rows.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Mar 2019 22:57:20 +0000 (17:57 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 1 Mar 2019 22:57:20 +0000 (17:57 -0500)
commit3396138a6de329fa7b5e0dda79219b4ae82622dc
tree8a8a18a2762cc1c3c6634f3318d3af39bc772f3d
parent65ce07e0202f2ef0953be9d085d3e5df7ad353a4
Check we don't misoptimize a NOT IN where the subquery returns no rows.

Future-proofing against a common mistake in attempts to optimize NOT IN.
We don't have such an optimization right now, but attempts to do so
are in the works, and some of 'em are buggy.  Add a regression test case
covering the point.

David Rowley

Discussion: https://postgr.es/m/CAKJS1f90E9agVZryVyUpbHQbjTt5ExqS2Fsodmt5_A7E_cEyVA@mail.gmail.com
src/test/regress/expected/subselect.out
src/test/regress/sql/subselect.sql