Create new routines systable_beginscan_ordered, systable_getnext_ordered,
Tom Lane <tgl@sss.pgh.pa.us>
Create new routines systable_beginscan_ordered, systable_getnext_ordered, systable_endscan_ordered that have API similar to systable_beginscan etc (in particular, the passed-in scankeys have heap not index attnums), but guarantee ordered output, unlike the existing functions. For the moment these are just very thin wrappers around index_beginscan/index_getnext/etc. Someday they might need to get smarter; but for now this is just a code refactoring exercise to reduce the number of direct callers of index_getnext, in preparation for changing that function's API. In passing, remove index_getnext_indexitem, which has been dead code for quite some time, and will have even less use than that in the presence of run-time-lossy indexes.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/tuptoaster.c | modified | +23 −20 |
| src/backend/access/index/genam.c | modified | +85 −1 |
| src/backend/access/index/indexam.c | modified | +2 −46 |
| src/backend/catalog/catalog.c | modified | +11 −16 |
| src/backend/storage/large_object/inv_api.c | modified | +26 −25 |
| src/backend/utils/cache/ts_cache.c | modified | +6 −5 |
| src/include/access/genam.h | modified | +8 −3 |
| src/include/access/relscan.h | modified | +4 −6 |
| src/include/catalog/catalog.h | modified | +3 −2 |