agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use the proper comparator in gbt_bit_ssup_cmp.
Date: Fri, 03 Jul 2026 17:11:24 +0000
Message-ID: <E1wfhQC-001Bzi-2F@gemulon.postgresql.org> (raw)
Use the proper comparator in gbt_bit_ssup_cmp.
If we're dealing with leaf entries, the function to call is bitcmp
not byteacmp. Using byteacmp didn't lead to any obvious failure,
but it did result in sorting the entries in a way not matching the
datatype's actual sort order. Hence the constructed index would be
less efficient than one would expect, and in particular worse than
what you got before this code was added in v18 (by commit e4309f73f).
We might want to recommend that users reindex btree_gist indexes
on bit/varbit columns.
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Discussion: https://postgr.es/m/AH*AvQCYKhQGVvPWi1GiU4oY.8.1781609375063.Hmail.3020001251@tju.edu.cn
Backpatch-through: 18
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/11cb9c431127ad0f331b1bf884f5c646f70b3c4f
Modified Files
--------------
contrib/btree_gist/btree_bit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
view thread (3+ messages) latest in thread
Message-ID: <E1wfhQC-001Bzi-2F@gemulon.postgresql.org>
Permalink: ../E1wfhQC-001Bzi-2F@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wfhQC-001Bzi-2F@gemulon.postgresql.org
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: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Use the proper comparator in gbt_bit_ssup_cmp.
In-Reply-To: <E1wfhQC-001Bzi-2F@gemulon.postgresql.org>
* 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