postgres/contrib/btree_gist
Peter Eisentraut 7d6d2c4bbd Drop opcintype from index AM strategy translation API
The type argument wasn't actually really necessary.  It was a remnant
of converting the API of the gist strategy translation from using
opclass to using opfamily+opcintype (commits c09e5a6a01,
622f678c10).  For looking up the gist translation function, we used
the convention "amproclefttype = amprocrighttype = opclass's
opcintype" (see pg_amproc.h).  But each operator family should only
have one translation function, and getting the right type for the
lookup is sometimes cumbersome and fragile, so this is all
unnecessarily complicated.

To simplify this, change the gist stategy support procedure to take
"any", "any" as argument.  (This is arbitrary but seems intuitive.
The alternative of using InvalidOid as argument(s) upsets various DDL
commands, so it's not practical.)  Then we don't need opcintype for
the lookup, and we can remove it from all the API layers introduced by
commit c09e5a6a01.

This also adds some more documentation about the correct signature of
the gist support function and adds more checks in gistvalidate().
This was previously underspecified.  (It relied implicitly on
convention mentioned above.)

Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
2025-02-21 09:07:16 +01:00
..
data Add btree_gist support for enum types. 2017-03-21 10:43:27 -04:00
expected Change gist stratnum function to use CompareType 2025-01-15 11:34:04 +01:00
sql Change gist stratnum function to use CompareType 2025-01-15 11:34:04 +01:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
btree_bit.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_bool.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_bytea.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_cash.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_date.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_enum.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_float4.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_float8.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_gist--1.1--1.2.sql Make contrib modules' installation scripts more secure. 2020-08-10 10:44:42 -04:00
btree_gist--1.2--1.3.sql Add uuid to the set of types supported by contrib/btree_gist. 2016-11-29 14:08:34 -05:00
btree_gist--1.2.sql Handle contrib's GIN/GIST support function signature changes honestly. 2016-06-09 16:44:25 -04:00
btree_gist--1.3--1.4.sql Add support for EUI-64 MAC addresses as macaddr8 2017-03-15 11:16:25 -04:00
btree_gist--1.4--1.5.sql Add btree_gist support for enum types. 2017-03-21 10:43:27 -04:00
btree_gist--1.5--1.6.sql Update btree_gist extension for parallel query 2020-07-20 13:59:50 +03:00
btree_gist--1.6--1.7.sql Fix gist_bool_ops to use gbtreekey2 2021-11-08 01:14:55 +01:00
btree_gist--1.7--1.8.sql Drop opcintype from index AM strategy translation API 2025-02-21 09:07:16 +01:00
btree_gist--1.0--1.1.sql Add index-only scan support to btree_gist. 2015-03-27 23:35:16 +02:00
btree_gist.c Move CompareType to separate header file 2025-02-02 08:11:57 +01:00
btree_gist.control Add stratnum GiST support function 2024-09-17 11:29:29 +02:00
btree_gist.h Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
btree_inet.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_int2.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_int4.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_int8.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_interval.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_macaddr.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_macaddr8.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_numeric.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_oid.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_text.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_time.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_ts.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
btree_utils_num.c Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
btree_utils_num.h Remove unused #include's from contrib, pl, test .c files 2024-10-28 08:02:17 +01:00
btree_utils_var.c Remove unused #include's from contrib, pl, test .c files 2024-10-28 08:02:17 +01:00
btree_utils_var.h Remove unused #include's from contrib, pl, test .c files 2024-10-28 08:02:17 +01:00
btree_uuid.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
Makefile Add temporal PRIMARY KEY and UNIQUE constraints 2024-09-17 11:29:30 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00