public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Mark Dilger <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: pgsql: Generalize hash and ordering support in amapi
Date: Sat, 1 Mar 2025 09:23:57 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHgHdKuCQ3Dh8wt9QxWRmezgE62qzYW86T9Mv1n5s3fOJ4G2dQ@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CAHgHdKuCQ3Dh8wt9QxWRmezgE62qzYW86T9Mv1n5s3fOJ4G2dQ@mail.gmail.com>

On 27.02.25 23:17, Mark Dilger wrote:
> 
> On Thu, Feb 27, 2025 at 8:27 AM Tom Lane <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     Peter Eisentraut <[email protected]
>     <mailto:[email protected]>> writes:
>      > 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.
> 
>     AFAICS, this patch sets amcancrosscompare true only for btree,
>     which means this change to equality_ops_are_compatible is surely wrong:
> 
>     -       /* must be btree or hash */
>     -       if (op_form->amopmethod == BTREE_AM_OID ||
>     -           op_form->amopmethod == HASH_AM_OID)
>     +       if (amroutine->amcancrosscompare)
> 
> 
> It seems you are right.  hashhandler()'s amroutine should have this 
> true, also.

I have fixed that.  I will come back to the rest of the discussion in a bit.






view thread (10+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgsql: Generalize hash and ordering support in amapi
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox