From ce62f2f2a0a48d021f250ba84dfcab5d45ddc914 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 27 Feb 2025 17:03:31 +0100 Subject: 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 Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com --- src/backend/access/spgist/spgutils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/backend/access/spgist/spgutils.c') diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c index 367c36ef9af..7e56b1e6b95 100644 --- a/src/backend/access/spgist/spgutils.c +++ b/src/backend/access/spgist/spgutils.c @@ -50,6 +50,8 @@ spghandler(PG_FUNCTION_ARGS) amroutine->amoptsprocnum = SPGIST_OPTIONS_PROC; amroutine->amcanorder = false; amroutine->amcanorderbyop = true; + amroutine->amcanhash = false; + amroutine->amcancrosscompare = false; amroutine->amcanbackward = false; amroutine->amcanunique = false; amroutine->amcanmulticol = false; -- cgit v1.2.3