pgsql: Rename gist stratnum support function

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Rename gist stratnum support function
Date: 2025-06-02 06:46:42
Message-ID: E1uLywT-0018lT-1M@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)illuminatedcomputing(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-06-02 08:19:09 pgsql: Fix incorrect format placeholders
Previous Message Michael Paquier 2025-06-02 03:33:23 Re: pgsql: postgres_fdw: Inherit the local transaction's access/deferrable