Re: Index-only-scans, indexam API changes - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Index-only-scans, indexam API changes
Date
Msg-id 4A5B4CC6.9020702@enterprisedb.com
Whole thread Raw
In response to Re: Index-only-scans, indexam API changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Index-only-scans, indexam API changes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> At the moment, amgettuple only returns pointers to heap tuples. There is
>> no way to return data from the index tuples. That needs to be changed to
>> support index-only scans.
> 
> What are you going to do for index types that don't store the original
> data (e.g. hash)?

They will obviously not be able to regurgitate index tuples. I have not
yet decided how that's going to be signaled. In the prototype patch I
have, I have hard-coded that only b-trees can do that. A new column
"amcanreturntuples" column in pg_am seems like the most straightforward way.

(This indexam API patch isn't bothered with that yet. It just splits
index_gettuple() into two)

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: ECPG support for string pseudo-type
Next
From: Daniel Schuchardt
Date:
Subject: (No) Autocast in 8.4 with operators "=" and "LIKE"