agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reverse-engineer some documentation for btree_gist's varlena mod
Date: Fri, 03 Jul 2026 17:18:20 +0000
Message-ID: <E1wfhWu-001C2m-2f@gemulon.postgresql.org> (raw)

Reverse-engineer some documentation for btree_gist's varlena modules.

There are a number of rather subtle points about the behavior of
this code, which its original authors did not deign to document.
Try to improve that.  In particular, explain how internal and leaf
keys can differ and what the restrictions are on that.

This work arose from trying to fix some bugs, and in the process
I believe I've identified some more, but this patch does not attempt
to fix anything, only document it.  I did make a few purely cosmetic
code changes, such as removing dead (and confusing!) initializations
of variables and choosing more appropriate types for some pointers.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d6284bbd152c1ea9e73bc77d6cb26bbf636d569b

Modified Files
--------------
contrib/btree_gist/btree_bit.c       | 50 ++++++++++++++++++++++++--------
contrib/btree_gist/btree_bytea.c     |  4 ++-
contrib/btree_gist/btree_numeric.c   |  9 +++++-
contrib/btree_gist/btree_text.c      | 12 ++++++--
contrib/btree_gist/btree_utils_var.c | 55 +++++++++++++++++++++++++-----------
contrib/btree_gist/btree_utils_var.h | 38 +++++++++++++++++++++++--
6 files changed, 135 insertions(+), 33 deletions(-)



Message-ID: <E1wfhWu-001C2m-2f@gemulon.postgresql.org>
Permalink:  ../E1wfhWu-001C2m-2f@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wfhWu-001C2m-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: Reverse-engineer some documentation for btree_gist's varlena mod
  In-Reply-To: <E1wfhWu-001C2m-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