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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ce62f2f2a0a48d021f250ba84dfcab5d45ddc914
Modified Files
--------------
contrib/bloom/blutils.c | 2 ++
doc/src/sgml/indexam.sgml | 4 +++
src/backend/access/brin/brin.c | 2 ++
src/backend/access/gin/ginutil.c | 2 ++
src/backend/access/gist/gist.c | 2 ++
src/backend/access/hash/hash.c | 2 ++
src/backend/access/nbtree/nbtree.c | 2 ++
src/backend/access/spgist/spgutils.c | 2 ++
src/backend/commands/opclasscmds.c | 34 ++++++++++++------------
src/backend/executor/nodeIndexscan.c | 4 +--
src/backend/utils/cache/lsyscache.c | 8 +++---
src/include/access/amapi.h | 4 +++
src/test/modules/dummy_index_am/dummy_index_am.c | 2 ++
src/test/regress/expected/alter_generic.out | 6 ++---
14 files changed, 50 insertions(+), 26 deletions(-)