Re: Why is FOR ORDER BY function getting called when the index is handling ordering?

2024-05-02 Thread Chris Cleveland
> > ... there's no reason the system needs to know the actual float value > > returned by rank_match(), the ordering operator distance function. In any > > case, that value can only be calculated based on information in the index > > itself, and can't be calculated by rank_match(). > > This seems

Re: Why is FOR ORDER BY function getting called when the index is handling ordering?

2024-05-02 Thread Tom Lane
Chris Cleveland writes: > I'm building an index access method which supports an ordering operator: > CREATE OPERATOR pg_catalog.<<=>> ( > FUNCTION = rdb.rank_match, > LEFTARG = record, > RIGHTARG = rdb.RankSpec > ); Okay ... > ... there's no reason the system

Re: Why is FOR ORDER BY function getting called when the index is handling ordering?

2024-05-02 Thread Matthias van de Meent
On Thu, 2 May 2024 at 18:50, Chris Cleveland wrote: > > Sorry to have to ask for help here, but no amount of stepping through code is > giving me the answer. > > I'm building an index access method which supports an ordering operator: [...] > so there's no reason the system needs to know the

Why is FOR ORDER BY function getting called when the index is handling ordering?

2024-05-02 Thread Chris Cleveland
Sorry to have to ask for help here, but no amount of stepping through code is giving me the answer. I'm building an index access method which supports an ordering operator: CREATE OPERATOR pg_catalog.<<=>> ( FUNCTION = rdb.rank_match, LEFTARG = record, RIGHTARG =