summaryrefslogtreecommitdiff
path: root/src/include/access/amapi.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-02-27 17:03:31 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-02-27 17:03:31 +0100
commitce62f2f2a0a48d021f250ba84dfcab5d45ddc914 (patch)
treedd73a4a521f961961ce8c991363b3425e9e4741d /src/include/access/amapi.h
parent6eb8a1a4f90c542d7ce9dcc381528fcb81390ab9 (diff)
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
Diffstat (limited to 'src/include/access/amapi.h')
-rw-r--r--src/include/access/amapi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/access/amapi.h b/src/include/access/amapi.h
index fbe6b225ec9..bf729a1e4ae 100644
--- a/src/include/access/amapi.h
+++ b/src/include/access/amapi.h
@@ -243,6 +243,10 @@ typedef struct IndexAmRoutine
bool amcanorder;
/* does AM support ORDER BY result of an operator on indexed column? */
bool amcanorderbyop;
+ /* does AM support hashing using API consistent with the hash AM? */
+ bool amcanhash;
+ /* does AM support cross-type comparisons? */
+ bool amcancrosscompare;
/* does AM support backward scanning? */
bool amcanbackward;
/* does AM support UNIQUE indexes? */