Correct misleading error messages
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 26 Jun 2025 20:02:16 +0000 (22:02 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 26 Jun 2025 20:02:16 +0000 (22:02 +0200)
Commit 7d6d2c4bbd7 dropped opcintype from the index AM strategy
translation API.  But some error messages about failed lookups still
mentioned it, even though it was not used for the lookup.  Fix by
removing ipcintype from the error messages as well.

src/backend/commands/indexcmds.c
src/backend/commands/tablecmds.c

index f2898fee5fcd5d06b30ca9d5575782136b34c74d..6f753ab6d7a0dd527ce8d57d0227d66eb3a4b2a4 100644 (file)
@@ -2469,8 +2469,8 @@ GetOperatorFromCompareType(Oid opclass, Oid rhstype, CompareType cmptype,
                    cmptype == COMPARE_EQ ? errmsg("could not identify an equality operator for type %s", format_type_be(opcintype)) :
                    cmptype == COMPARE_OVERLAP ? errmsg("could not identify an overlaps operator for type %s", format_type_be(opcintype)) :
                    cmptype == COMPARE_CONTAINED_BY ? errmsg("could not identify a contained-by operator for type %s", format_type_be(opcintype)) : 0,
-                   errdetail("Could not translate compare type %d for operator family \"%s\", input type %s, access method \"%s\".",
-                             cmptype, get_opfamily_name(opfamily, false), format_type_be(opcintype), get_am_name(amid)));
+                   errdetail("Could not translate compare type %d for operator family \"%s\" of access method \"%s\".",
+                             cmptype, get_opfamily_name(opfamily, false), get_am_name(amid)));
 
        /*
         * We parameterize rhstype so foreign keys can ask for a <@ operator
index 1c3ad74e7b9e9c170e3ef5c2041d7bf24ac266f6..e2b94c8c6098b7c78d3cc306265112953ee00213 100644 (file)
@@ -10330,8 +10330,8 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
                    for_overlaps
                    ? errmsg("could not identify an overlaps operator for foreign key")
                    : errmsg("could not identify an equality operator for foreign key"),
-                   errdetail("Could not translate compare type %d for operator family \"%s\", input type %s, access method \"%s\".",
-                             cmptype, get_opfamily_name(opfamily, false), format_type_be(opcintype), get_am_name(amid)));
+                   errdetail("Could not translate compare type %d for operator family \"%s\" of access method \"%s\".",
+                             cmptype, get_opfamily_name(opfamily, false), get_am_name(amid)));
 
        /*
         * There had better be a primary equality operator for the index.