Generalize hash and ordering support in amapi
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 27 Feb 2025 16:03:31 +0000 (17:03 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 27 Feb 2025 16:03:31 +0000 (17:03 +0100)
commitce62f2f2a0a48d021f250ba84dfcab5d45ddc914
treedd73a4a521f961961ce8c991363b3425e9e4741d
parent6eb8a1a4f90c542d7ce9dcc381528fcb81390ab9
Generalize hash and ordering support in amapi

Stop comparing access method OID values against HASH_AM_OID and
BTREE_AM_OID, and instead check the IndexAmRoutine for an index to see
if it advertises its ability to perform the necessary ordering,
hashing, or cross-type comparing functionality.  A field amcanorder
already existed, this uses it more widely.  Fields amcanhash and
amcancrosscompare are added for the other purposes.

Author: Mark Dilger <mark.dilger@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
14 files changed:
contrib/bloom/blutils.c
doc/src/sgml/indexam.sgml
src/backend/access/brin/brin.c
src/backend/access/gin/ginutil.c
src/backend/access/gist/gist.c
src/backend/access/hash/hash.c
src/backend/access/nbtree/nbtree.c
src/backend/access/spgist/spgutils.c
src/backend/commands/opclasscmds.c
src/backend/executor/nodeIndexscan.c
src/backend/utils/cache/lsyscache.c
src/include/access/amapi.h
src/test/modules/dummy_index_am/dummy_index_am.c
src/test/regress/expected/alter_generic.out