pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Teach predtest.c that "foo" implies "foo IS NOT NULL".
2+ messages / 1 participants
[nested] [flat]

* pgsql: Teach predtest.c that "foo" implies "foo IS NOT NULL".
@ 2015-08-01 18:32 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-08-01 18:32 UTC (permalink / raw)
  To: pgsql-committers

Teach predtest.c that "foo" implies "foo IS NOT NULL".

Per complaint from Peter Holzer.  It's useful to cover this special case,
since for a boolean variable "foo", earlier parts of the planner will have
reduced variants like "foo = true" to just "foo", and thus we may fail
to recognize the applicability of a partial index with predicate
"foo IS NOT NULL".

Back-patch to 9.5, but not further; given the lack of previous complaints
this doesn't seem like behavior to change in stable branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/dea1491ffb448d20764a5f2cec8ae33b64dd39f8

Modified Files
--------------
src/backend/optimizer/util/predtest.c |    4 ++++
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Teach predtest.c that "foo" implies "foo IS NOT NULL".
@ 2015-08-01 18:32 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-08-01 18:32 UTC (permalink / raw)
  To: pgsql-committers

Teach predtest.c that "foo" implies "foo IS NOT NULL".

Per complaint from Peter Holzer.  It's useful to cover this special case,
since for a boolean variable "foo", earlier parts of the planner will have
reduced variants like "foo = true" to just "foo", and thus we may fail
to recognize the applicability of a partial index with predicate
"foo IS NOT NULL".

Back-patch to 9.5, but not further; given the lack of previous complaints
this doesn't seem like behavior to change in stable branches.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8dccf030e884ea8c723275a070acf8a8ed1eebe1

Modified Files
--------------
src/backend/optimizer/util/predtest.c |    4 ++++
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-08-01 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-08-01 18:32 pgsql: Teach predtest.c that "foo" implies "foo IS NOT NULL". Tom Lane <tgl@sss.pgh.pa.us>
2015-08-01 18:32 pgsql: Teach predtest.c that "foo" implies "foo IS NOT NULL". Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox