Check we don't misoptimize a NOT IN where the subquery returns no rows.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3396138a6de329fa7b5e0dda79219b4ae82622dc
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2019-03-01T22:57:20Z
Releases: 12.0
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

Files

Discussion