Changes in amcanreturn() interface to support multicolumn indexes - Mailing list pgsql-hackers

From Anastasia Lubennikova
Subject Changes in amcanreturn() interface to support multicolumn indexes
Date
Msg-id CAP4vRV7XxvziKV6u7kZt6OoBAmmRX0Pun-h==zDDnzjJ269=yA@mail.gmail.com
Whole thread Raw
Responses Re: Changes in amcanreturn() interface to support multicolumn indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Changes in amcanreturn() interface to support multicolumn indexes.
Hi, hackers
There is a question of support multicolumn index only scans for GIST.
I need help with this problem.

bool amcanreturn() - function to check whether index supports index-only scans.
Now it's defined for 
- B-tree. It always returns true, so there's no questions.
- SP-GIST. It doesn't support multicolumn indexes, so there's no problems in spgcanreturn too.

- GIST. In first version it works only for onecolumn indexes. gistcanreturn() checks whether fetch() method is defined for column's data type.

There is a question of support multicolumn index only scans for GIST.
gistcanreturn() can return true if fetch is implemented for all indexed columns and false otherwise.
But that's not very good case for multicolumn indexes.

I think, it requires extend the interface to add separate columns checking.
But I can't understand what kind of changes is required 
and how would it affect on previous amcanreturn interface.


--
Regards,
Lubennikova Anastasia

pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: postgresql.auto.conf and reload
Next
From: David Rowley
Date:
Subject: Re: Allowing join removals for more join types