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

From Alexander Korotkov
Subject Re: POC, WIP: OR-clause support for indexes
Date
Msg-id CAPpHfdv=diZVP_JYPd2Pf_55-W1gf6Pt9DcmP-xyRfiMH5mv-Q@mail.gmail.com
Whole thread Raw
In response to Re: POC, WIP: OR-clause support for indexes  (Andrei Lepikhov <lepihov@gmail.com>)
List pgsql-hackers
On Tue, Jan 28, 2025 at 10:42 AM Andrei Lepikhov <lepihov@gmail.com> wrote:
> 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.

OK, thank you!

------
Regards,
Alexander Korotkov
Supabase



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting rid of CaseTestExpr (well, partially)
Next
From: Alexander Korotkov
Date:
Subject: Re: POC, WIP: OR-clause support for indexes