pgsql: Expand the 'special index operator' machinery to handle special - Mailing list pgsql-committers

From tgl@svr1.postgresql.org (Tom Lane)
Subject pgsql: Expand the 'special index operator' machinery to handle special
Date
Msg-id 20050326232921.9C37753768@svr1.postgresql.org
Whole thread Raw
List 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)

pgsql-committers by date:

Previous
From: tgl@svr1.postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix a pair of related issues with estimation of inequalities that
Next
From: tgl@svr1.postgresql.org (Tom Lane)
Date:
Subject: pgsql: Add a back-link from IndexOptInfo structs to their parent