Re: Index AM API cleanup - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Index AM API cleanup
Date
Msg-id 04a07cf9-f3b0-42fa-bc96-96cc731725dd@eisentraut.org
Whole thread Raw
In response to Re: Index AM API cleanup  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-hackers
On 12.03.25 17:08, Mark Dilger wrote:
> 
> 
> On Wed, Mar 12, 2025 at 7:25 AM Tom Lane <tgl@sss.pgh.pa.us 
> <mailto:tgl@sss.pgh.pa.us>> wrote:
> 
>     Peter Eisentraut <peter@eisentraut.org
>     <mailto:peter@eisentraut.org>> writes:
>      > 0002: Add get_opfamily_member_for_cmptype().  This was called
>      > get_opmethod_member() in your patch set, but I think that name
>     wasn't
>      > quite right.  I also removed the opmethod argument, which was rarely
>      > used and is somewhat redundant.
> 
>     Hm, that will throw an error if IndexAmTranslateCompareType fails.
>     Shouldn't it be made to return InvalidOid instead?
> 
> 
> There are two failure modes.  In one mode, the AM has a concept of 
> equality, but there is no operator for the given type.  In the other 
> mode, the AM simply has no concept of equality.

I have committed it in such a way that it returns InvalidOid in either 
case.  That seems the safest approach for now.




pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.
Next
From: Peter Eisentraut
Date:
Subject: Re: Index AM API cleanup