Teach SP-GiST to do index-only scans.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 92203624934095163f8b57b5b3d7bbd2645da2c8
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2011-12-19T19:58:41Z
Releases: 9.2.0
Teach SP-GiST to do index-only scans.

Operator classes can specify whether or not they support this; this
preserves the flexibility to use lossy representations within an index.

In passing, move constant data about a given index into the rd_amcache
cache area, instead of doing fresh lookups each time we start an index
operation.  This is mainly to try to make sure that spgcanreturn() has
insignificant cost; I still don't have any proof that it matters for
actual index accesses.  Also, get rid of useless copying of FmgrInfo
pointers; we can perfectly well use the relcache's versions in-place.

Files