Heikki Linnakangas <heikki@enterprisedb.com> writes:
> Martijn van Oosterhout wrote:
>> IIRC indexes can already ask to have the system recheck conditions on
>> returned tuples. For example GiST can return more tuples than actually
>> match. That's what the amopreqcheck column is for in pg_amop.
> Right, except that flag is per operator in operator class, and what I'm
> proposing is that the index could pass a flag per tuple in the scan.
The reason for attaching the flag to operators is so that the system
(particularly the planner) can tell *which* conditions need to be
rechecked, and can prepare the necessary expression infrastructure.
I dislike the idea of having to be prepared to do that every time
for every indexscan. The notion of having to be prepared to sort
(according to what?) is even worse.
regards, tom lane