pgsql: Teach nulltestsel() that system columns are never NULL.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Teach nulltestsel() that system columns are never NULL.
Date: 2019-01-25 16:44:31
Message-ID: E1gn4al-0001Rp-DR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Teach nulltestsel() that system columns are never NULL.

While it's perhaps unlikely that users would write an explicit test
like "ctid IS NULL", this function is also used in range estimation,
and an incorrect answer can throw off the results for tight ranges.
Anyway it's not much code so we might as well do it.

Edmund Horner

Discussion: https://postgr.es/m/CAMyN-kCa3BFUFrCTtQeprxTU1anCd3Pua7zXstGCKq4pXgjukw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ff750ce2d82979e9588c629955e161a9379b05f3

Modified Files
--------------
src/backend/utils/adt/selfuncs.c | 9 +++++++++
1 file changed, 9 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-01-25 22:09:53 pgsql: Split QTW_EXAMINE_RTES flag into QTW_EXAMINE_RTES_BEFORE/_AFTER.
Previous Message Tom Lane 2019-01-25 16:27:50 pgsql: Fix possibly-uninitialized-variable warning from commit 9556aa01