Add support for index-only scans in GiST.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: d04c8ed9044eccebce043143a930617e3998c005
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2015-03-26T17:12:00Z
Releases: 9.5.0
Add support for index-only scans in GiST.

This adds a new GiST opclass method, 'fetch', which is used to reconstruct
the original Datum from the value stored in the index. Also, the 'canreturn'
index AM interface function gains a new 'attno' argument. That makes it
possible to use index-only scans on a multi-column index where some of the
opclasses support index-only scans but some do not.

This patch adds support in the box and point opclasses. Other opclasses
can added later as follow-on patches (btree_gist would be particularly
interesting).

Anastasia Lubennikova, with additional fixes and modifications by me.

Files