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