Robert Haas <robertmhaas@gmail.com> writes:
> Tom Lane previously proposed extending SP-GiST to support index-only
> scans. You might find that discussing worth reading, or perhaps
> consider it as an alternative if GiST doesn't work out:
> http://www.postgresql.org/message-id/10839.1323885644@sss.pgh.pa.us
That wasn't just a proposal, see commits
3695a555136a6d179cac8ae48d5f90171d5b30e9 and
92203624934095163f8b57b5b3d7bbd2645da2c8. But yeah, that might be a
useful reference for what is likely to be involved with making GIST
do it.
regards, tom lane