pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rename gist stratnum support function
Date: Mon, 02 Jun 2025 06:46:42 +0000
Message-ID: <E1uLywT-0018lT-1M@gemulon.postgresql.org> (raw)

Rename gist stratnum support function

Commit 7406ab623fe added a gist support function that we internally
refer to by the symbol GIST_STRATNUM_PROC.  This translated from
"well-known" strategy numbers to opfamily-specific strategy numbers.
However, we later (commit 630f9a43cec) changed this to fit into
index-AM-level compare type mapping, so this function actually now
maps from compare type to opfamily-specific strategy numbers.  So this
name is no longer fitting.

Moreover, the index AM level also supports the opposite, a function to
map from strategy number to compare type.  This is currently not
supported in gist, but one might wonder what this function is supposed
to be called when it is added.

This patch changes the naming of the gist-level functionality to be
more in line with the index-AM-level functionality.  This makes sense
because these are essentially the same thing on different levels.
This also changes the names of the externally visible functions that
are provided for use as such a support function.

Reviewed-by: Paul A Jungwirth <pj@illuminatedcomputing.com>
Discussion: https://www.postgresql.org/message-id/37ebb1d9-9036-485f-a215-e55435689917%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/32edf732e8dc9eb3e7a923aeb67d49246744a20a

Modified Files
--------------
contrib/btree_gist/btree_gist--1.7--1.8.sql  | 54 ++++++++++++++--------------
contrib/btree_gist/btree_gist.c              |  4 +--
contrib/btree_gist/expected/stratnum.out     | 18 +++++-----
contrib/btree_gist/sql/stratnum.sql          |  6 ++--
doc/src/sgml/gist.sgml                       | 25 +++++++++----
doc/src/sgml/xindex.sgml                     |  2 +-
src/backend/access/gist/gistutil.c           | 14 ++++----
src/backend/access/gist/gistvalidate.c       |  6 ++--
src/include/access/gist.h                    |  2 +-
src/include/catalog/catversion.h             |  2 +-
src/include/catalog/pg_amproc.dat            | 12 +++----
src/include/catalog/pg_proc.dat              |  4 +--
src/test/regress/expected/misc_functions.out | 18 +++++-----
src/test/regress/sql/misc_functions.sql      |  6 ++--
14 files changed, 92 insertions(+), 81 deletions(-)



Message-ID: <E1uLywT-0018lT-1M@gemulon.postgresql.org>
Permalink:  ../E1uLywT-0018lT-1M@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uLywT-0018lT-1M@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Rename gist stratnum support function
  In-Reply-To: <E1uLywT-0018lT-1M@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox