Re: [PATCH] Add support function for containment operators

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Kim Johan Andersson <kimjand(at)kimmet(dot)dk>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Add support function for containment operators
Date: 2023-07-07 11:20:41
Message-ID: 147ac793f2c3a9a57764fba84988a4b5e843443b.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> You implement both "SupportRequestIndexCondition" and "SupportRequestSimplify",
> but when I experimented, the former was never called.  That does not
> surprise me, since any expression of the shape "expr <@ range constant"
> can be simplified.  Is the "SupportRequestIndexCondition" branch dead code?
> If not, do you have an example that triggers it?

I had an idea about this:
So far, you only consider constant ranges. But if we have a STABLE range
expression, you could use an index scan for "expr <@ range", for example
Index Cond (expr >= lower(range) AND expr < upper(range)).

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2023-07-07 11:21:03 Re: Disabling Heap-Only Tuples
Previous Message Laurenz Albe 2023-07-07 11:10:48 Re: Disabling Heap-Only Tuples