Rename gist stratnum support function
authorPeter Eisentraut <[email protected]>
Mon, 2 Jun 2025 06:33:04 +0000 (08:33 +0200)
committerPeter Eisentraut <[email protected]>
Mon, 2 Jun 2025 06:41:27 +0000 (08:41 +0200)
commit32edf732e8dc9eb3e7a923aeb67d49246744a20a
tree16156ef00c2a2d2170268a652c557945e34fce29
parent5231ed8262c94936a69bce41f64076630bbd99a2
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 <[email protected]>
Discussion: https://www.postgresql.org/message-id/37ebb1d9-9036-485f-a215-e55435689917%40eisentraut.org
14 files changed:
contrib/btree_gist/btree_gist--1.7--1.8.sql
contrib/btree_gist/btree_gist.c
contrib/btree_gist/expected/stratnum.out
contrib/btree_gist/sql/stratnum.sql
doc/src/sgml/gist.sgml
doc/src/sgml/xindex.sgml
src/backend/access/gist/gistutil.c
src/backend/access/gist/gistvalidate.c
src/include/access/gist.h
src/include/catalog/catversion.h
src/include/catalog/pg_amproc.dat
src/include/catalog/pg_proc.dat
src/test/regress/expected/misc_functions.out
src/test/regress/sql/misc_functions.sql