public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Ayush Tiwari <[email protected]>
Cc: 王跃林 <[email protected]>
Cc: pgsql-bugs <[email protected]>
Cc: 3764353996 <[email protected]>
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: Fri, 03 Jul 2026 15:36:09 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJTYsWUvzzik7uW-ZeqDELdpZV8ZxxfO4yx0_B8j1-8ndzgsGQ@mail.gmail.com>
References: <AH*AvQCYKhQGVvPWi1GiU4oY.8.1781609375063.Hmail.3020001251@tju.edu.cn>
	<CAJTYsWWSx+5-kVaivB_znaQCk3TmHrO4QNNM-CD3AN-oOSmG8w@mail.gmail.com>
	<AGoA0AD5KvwQ8G7e6ofMyap6.3.1781760245047.Hmail.3020001251@tju.edu.cn>
	<[email protected]>
	<CAJTYsWX1C5JLj92QdqEcArWs4XtXPog+yvyb6=X=_cghjXnkYQ@mail.gmail.com>
	<[email protected]>
	<CAJTYsWVus+7hn846A0gMJYk+9uUGZxizk5Herbxb4CmhF3vndQ@mail.gmail.com>
	<[email protected]>
	<CAJTYsWUg+ZH=W5EduH1AEDfJU0waO4uU4hakaiOF+KKUKFbR9g@mail.gmail.com>
	<[email protected]>
	<CAJTYsWUvzzik7uW-ZeqDELdpZV8ZxxfO4yx0_B8j1-8ndzgsGQ@mail.gmail.com>

Ayush Tiwari <[email protected]> writes:
> On Fri, 3 Jul 2026 at 19:20, Tom Lane <[email protected]> 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






view thread (13+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  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
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox