Re: POC, WIP: OR-clause support for indexes - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: POC, WIP: OR-clause support for indexes
Date
Msg-id 8cf87fc0-1f79-4427-8134-9245a1a52cf4@gmail.com
Whole thread Raw
In response to Re: POC, WIP: OR-clause support for indexes  (Andrei Lepikhov <lepihov@gmail.com>)
Responses Re: POC, WIP: OR-clause support for indexes
List pgsql-hackers
On 1/28/25 11:36, Andrei Lepikhov wrote:
> On 1/27/25 16:50, Alexander Korotkov wrote:
> qsort(matches, n, sizeof(OrArgIndexMatch), or_arg_index_match_cmp);
> 
> To fit an index, the order of elements in the target array of the 
> `ScalarArrayOpExpr` may change compared to the initial list of OR 
> expressions. If there are indexes that cover the same set of columns but 
> in reverse order, this could potentially alter the position of a 
> Subplan. However, I believe this is a rare case; it is supported by the 
> initial OR path and should be acceptable.
I beg your pardon - I forgot that we've restricted the feature's scope 
and can't combine OR clauses into ScalarArrayOpExpr if the args list 
contains references to different columns.
So, my note can't be applied here.

-- 
regards, Andrei Lepikhov



pgsql-hackers by date:

Previous
From: Jim Jones
Date:
Subject: Re: XMLDocument (SQL/XML X030)
Next
From: Amit Kapila
Date:
Subject: Re: Pgoutput not capturing the generated columns