pgsql: Expand the 'special index operator' machinery to handle special

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Expand the 'special index operator' machinery to handle special
Date: 2005-03-26 23:29:21
Message-ID: 20050326232921.9C37753768@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Expand the 'special index operator' machinery to handle special cases
for boolean indexes. Previously we would only use such an index with
WHERE clauses like 'indexkey = true' or 'indexkey = false'. The new
code transforms the cases 'indexkey', 'NOT indexkey', 'indexkey IS TRUE',
and 'indexkey IS FALSE' into one of these. While this is only marginally
useful in itself, I intend soon to change constant-expression simplification
so that 'foo = true' and 'foo = false' are reduced to just 'foo' and
'NOT foo' ... which would lose the ability to use boolean indexes for
such queries at all, if the indexscan machinery couldn't make the
reverse transformation.

Modified Files:
--------------
pgsql/src/backend/optimizer/path:
indxpath.c (r1.169 -> r1.170)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c.diff?r1=1.169&r2=1.170)
orindxpath.c (r1.65 -> r1.66)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/orindxpath.c.diff?r1=1.65&r2=1.66)
pgsql/src/backend/optimizer/util:
pathnode.c (r1.112 -> r1.113)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/pathnode.c.diff?r1=1.112&r2=1.113)
pgsql/src/include/catalog:
pg_opclass.h (r1.62 -> r1.63)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_opclass.h.diff?r1=1.62&r2=1.63)
pgsql/src/include/optimizer:
paths.h (r1.78 -> r1.79)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/paths.h.diff?r1=1.78&r2=1.79)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2005-03-27 06:29:52 pgsql: Add a back-link from IndexOptInfo structs to their parent
Previous Message Tom Lane 2005-03-26 20:55:59 pgsql: Fix a pair of related issues with estimation of inequalities that