From: Peter Eisentraut Date: Tue, 4 Mar 2025 08:45:01 +0000 (+0100) Subject: Fix accidental use of = instead of == X-Git-Tag: REL_18_BETA1~699 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=3abbd8dbeb8f0e4764ad6edb1ab3a71d4c3023f0;p=postgresql.git Fix accidental use of = instead of == Fix for commit 630f9a43cec. It used = instead of ==. The result would be an incorrect error message. Author: Jacob Brazeal Reviewed-by: Michael Paquier Discussion: https://www.postgresql.org/message-id/flat/CA%2BCOZaC-JMbhQ4O0Q8V1Bxa0R%2BNex_RN9D6UyuLPiEx_CK4Heg%40mail.gmail.com --- diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index c92f5620ec1..32ff3ca9a28 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -2472,7 +2472,7 @@ GetOperatorFromCompareType(Oid opclass, Oid rhstype, CompareType cmptype, if (*strat == InvalidStrategy) ereport(ERROR, errcode(ERRCODE_UNDEFINED_OBJECT), - cmptype = COMPARE_EQ ? errmsg("could not identify an equality operator for type %s", format_type_be(opcintype)) : + 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\".",