Change the planner to allow indexscan qualification clauses to use
Tom Lane <tgl@sss.pgh.pa.us>
Change the planner to allow indexscan qualification clauses to use nonconsecutive columns of a multicolumn index, as per discussion around mid-May (pghackers thread "Best way to scan on-disk bitmaps"). This turns out to require only minimal changes in btree, and so far as I can see none at all in GiST. btcostestimate did need some work, but its original assumption that index selectivity == heap selectivity was quite bogus even before this.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/catalogs.sgml | modified | +9 −1 |
| doc/src/sgml/indexam.sgml | modified | +18 −9 |
| src/backend/access/index/indexam.c | modified | +1 −23 |
| src/backend/access/nbtree/nbtsearch.c | modified | +7 −5 |
| src/backend/access/nbtree/nbtutils.c | modified | +10 −7 |
| src/backend/optimizer/path/indxpath.c | modified | +26 −27 |
| src/backend/optimizer/util/plancat.c | modified | +3 −2 |
| src/backend/utils/adt/selfuncs.c | modified | +107 −15 |
| src/include/access/genam.h | modified | +1 −2 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_am.h | modified | +22 −20 |
| src/include/nodes/relation.h | modified | +2 −1 |