pgsql: Generalize hash and ordering support in amapi

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Generalize hash and ordering support in amapi
Date: 2025-02-27 16:15:46
Message-ID: E1tngY6-0000UL-2n@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)dilger(at)enterprisedb(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330(at)enterprisedb(dot)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(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-02-27 16:27:33 Re: pgsql: Generalize hash and ordering support in amapi
Previous Message Tom Lane 2025-02-27 15:58:27 pgsql: Avoid unnecessary computation of pgbench's script line number.