I wrote:
> We should just need a switching layer in front of heap_beginscan/
> index_beginscan and heap_getnext/index_getnext...)
After refreshing my memory of how these are used, it seems that
we'd have to change the API of either the heap or index scan routines
in order to unify them like that. Might be worth doing to maintain
code cleanliness, though. The places Hiroshi has fixed to support
both index and seq scan look really ugly to my eyes ...
regards, tom lane