Re: Index AM API cleanup

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Index AM API cleanup
Date: 2025-03-18 11:10:07
Message-ID: 04a07cf9-f3b0-42fa-bc96-96cc731725dd@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12.03.25 17:08, Mark Dilger wrote:
>
>
> On Wed, Mar 12, 2025 at 7:25 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>
> Peter Eisentraut <peter(at)eisentraut(dot)org
> <mailto:peter(at)eisentraut(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-03-18 11:11:05 Re: Index AM API cleanup
Previous Message vignesh C 2025-03-18 10:55:25 Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.