Replace simple constant pg_am.amcanreturn with an AM support function.
Tom Lane <tgl@sss.pgh.pa.us>
Replace simple constant pg_am.amcanreturn with an AM support function. The need for this was debated when we put in the index-only-scan feature, but at the time we had no near-term expectation of having AMs that could support such scans for only some indexes; so we kept it simple. However, the SP-GiST AM forces the issue, so let's fix it. This patch only installs the new API; no behavior actually changes.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/catalogs.sgml | modified | +8 −7 |
| doc/src/sgml/indexam.sgml | modified | +16 −8 |
| src/backend/access/index/indexam.c | modified | +22 −0 |
| src/backend/access/nbtree/nbtree.c | modified | +11 −0 |
| src/backend/access/spgist/spgscan.c | modified | +7 −0 |
| src/backend/optimizer/path/indxpath.c | modified | +2 −2 |
| src/backend/optimizer/util/plancat.c | modified | +1 −1 |
| src/include/access/genam.h | modified | +1 −0 |
| src/include/access/nbtree.h | modified | +1 −0 |
| src/include/access/spgist.h | modified | +1 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_am.h | modified | +26 −26 |
| src/include/catalog/pg_proc.h | modified | +4 −0 |
| src/include/nodes/relation.h | modified | +1 −1 |
| src/include/utils/rel.h | modified | +1 −0 |