mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
Rename gist stratnum support function
Commit7406ab623fadded 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 (commit630f9a43ce) 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
This commit is contained in:
@@ -890,17 +890,17 @@ SELECT pg_column_toast_chunk_id(a) IS NULL,
|
||||
|
||||
DROP TABLE test_chunk_id;
|
||||
DROP FUNCTION explain_mask_costs(text, bool, bool, bool, bool);
|
||||
-- test stratnum support functions
|
||||
SELECT gist_stratnum_common(7);
|
||||
gist_stratnum_common
|
||||
----------------------
|
||||
3
|
||||
-- test stratnum translation support functions
|
||||
SELECT gist_translate_cmptype_common(7);
|
||||
gist_translate_cmptype_common
|
||||
-------------------------------
|
||||
3
|
||||
(1 row)
|
||||
|
||||
SELECT gist_stratnum_common(3);
|
||||
gist_stratnum_common
|
||||
----------------------
|
||||
18
|
||||
SELECT gist_translate_cmptype_common(3);
|
||||
gist_translate_cmptype_common
|
||||
-------------------------------
|
||||
18
|
||||
(1 row)
|
||||
|
||||
-- relpath tests
|
||||
|
||||
@@ -400,9 +400,9 @@ SELECT pg_column_toast_chunk_id(a) IS NULL,
|
||||
DROP TABLE test_chunk_id;
|
||||
DROP FUNCTION explain_mask_costs(text, bool, bool, bool, bool);
|
||||
|
||||
-- test stratnum support functions
|
||||
SELECT gist_stratnum_common(7);
|
||||
SELECT gist_stratnum_common(3);
|
||||
-- test stratnum translation support functions
|
||||
SELECT gist_translate_cmptype_common(7);
|
||||
SELECT gist_translate_cmptype_common(3);
|
||||
|
||||
|
||||
-- relpath tests
|
||||
|
||||
Reference in New Issue
Block a user