On 12.03.25 17:08, Mark Dilger wrote:


On Wed, Mar 12, 2025 at 7:25 AM Tom Lane <t...@sss.pgh.pa.us <mailto:t...@sss.pgh.pa.us>> wrote:

    Peter Eisentraut <pe...@eisentraut.org
    <mailto:pe...@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.



Reply via email to