pgsql: Check we don't misoptimize a NOT IN where the subquery returns n

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Check we don't misoptimize a NOT IN where the subquery returns n
Date: 2019-03-01 22:57:27
Message-ID: E1gzr5r-00085f-1h@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3396138a6de329fa7b5e0dda79219b4ae82622dc

Modified Files
--------------
src/test/regress/expected/subselect.out | 13 +++++++++++++
src/test/regress/sql/subselect.sql | 9 +++++++++
2 files changed, 22 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2019-03-02 01:44:58 pgsql: Use a virtual rather than a heap slot in two places where that s
Previous Message Tom Lane 2019-03-01 22:14:26 pgsql: Teach optimizer's predtest.c more things about ScalarArrayOpExpr