Re: Fw:Re: Fw: gbt_var_consistent in contrib/btree_gist/btree_utils_var.c has internal-node type confusion on the <> strategy, bypassing exclusion constraints - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Fw:Re: Fw: gbt_var_consistent in contrib/btree_gist/btree_utils_var.c has internal-node type confusion on the <> strategy, bypassing exclusion constraints
Date
Msg-id 4139380.1783107369@sss.pgh.pa.us
Whole thread
In response to Re: Fw:Re: Fw: gbt_var_consistent in contrib/btree_gist/btree_utils_var.c has internal-node type confusion on the <> strategy, bypassing exclusion constraints  (Ayush Tiwari <ayushtiwari.slg01@gmail.com>)
List pgsql-bugs
Ayush Tiwari <ayushtiwari.slg01@gmail.com> writes:
> On Fri, 3 Jul 2026 at 19:20, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> BTW, thinking some more about 0004: isn't it pointless to check
>> gbt_var_node_pf_match in the gbt_var_consistent cases that
>> only constrain the lower bound, that is LessEqual and Less?

> Hmm, looks like the || gbt_var_node_pf_match(...) clause isn't
> needed in the BTLessStrategyNumber and BTLessEqualStrategyNumber
> cases.  Those only compare against the lower bound, and if query
> sorts before lower then it sorts before upper too, so a prefix
> match against the (truncated) upper can never succeed there.
> I tried changing it locally and ran the regression tests, all passed.

I did some more work on that idea (just cosmetic changes) and
pushed everything.  Thanks for working on this!

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fw:Re: Fw: gbt_var_consistent in contrib/btree_gist/btree_utils_var.c has internal-node type confusion on the <> strategy, bypassing exclusion constraints
Next
From: PG Bug reporting form
Date:
Subject: BUG #19543: ALTER RULE ... RENAME accepts reserved name "_RETURN" for a non-view rule; breaks a restored dump