Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 95e12d4

Browse files
committed
Correct misleading error messages
Commit 7d6d2c4 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.
1 parent 483f724 commit 95e12d4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/backend/commands/indexcmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,8 +2469,8 @@ GetOperatorFromCompareType(Oid opclass, Oid rhstype, CompareType cmptype,
24692469
cmptype == COMPARE_EQ ? errmsg("could not identify an equality operator for type %s", format_type_be(opcintype)) :
24702470
cmptype == COMPARE_OVERLAP ? errmsg("could not identify an overlaps operator for type %s", format_type_be(opcintype)) :
24712471
cmptype == COMPARE_CONTAINED_BY ? errmsg("could not identify a contained-by operator for type %s", format_type_be(opcintype)) : 0,
2472-
errdetail("Could not translate compare type %d for operator family \"%s\", input type %s, access method \"%s\".",
2473-
cmptype, get_opfamily_name(opfamily, false), format_type_be(opcintype), get_am_name(amid)));
2472+
errdetail("Could not translate compare type %d for operator family \"%s\" of access method \"%s\".",
2473+
cmptype, get_opfamily_name(opfamily, false), get_am_name(amid)));
24742474

24752475
/*
24762476
* We parameterize rhstype so foreign keys can ask for a <@ operator

src/backend/commands/tablecmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10330,8 +10330,8 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
1033010330
for_overlaps
1033110331
? errmsg("could not identify an overlaps operator for foreign key")
1033210332
: errmsg("could not identify an equality operator for foreign key"),
10333-
errdetail("Could not translate compare type %d for operator family \"%s\", input type %s, access method \"%s\".",
10334-
cmptype, get_opfamily_name(opfamily, false), format_type_be(opcintype), get_am_name(amid)));
10333+
errdetail("Could not translate compare type %d for operator family \"%s\" of access method \"%s\".",
10334+
cmptype, get_opfamily_name(opfamily, false), get_am_name(amid)));
1033510335

1033610336
/*
1033710337
* There had better be a primary equality operator for the index.

0 commit comments

Comments
 (0)