diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index 3a25ba52f3..0045f64c9e 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -2650,7 +2650,7 @@ quoteRelationName(char *buffer, Relation rel) * ri_GenerateQual --- generate a WHERE clause equating two variables * * The idea is to append " sep leftop op rightop" to buf, or if fkreftype is - * FKCONSTR_REF_EACH_ELEMENT, append " sep leftop op ANY(rightop)" to buf. + * FKCONSTR_REF_EACH_ELEMENT, append " sep leftop <@ rightop" to buf. * * The complexity comes from needing to be sure that the parser will select * the desired operator. We always name the operator using @@ -2697,17 +2697,10 @@ ri_GenerateQual(StringInfo buf, appendStringInfo(buf, " %s %s", sep, leftop); if (leftoptype != operform->oprleft) ri_add_cast_to(buf, operform->oprleft); - - appendStringInfo(buf, " OPERATOR(%s.%s) ", - quote_identifier(nspname), oprname); - - if (fkreftype == FKCONSTR_REF_EACH_ELEMENT) - appendStringInfoString(buf, "ANY ("); + appendStringInfo(buf, " @> "); appendStringInfoString(buf, rightop); if (rightoptype != oprright) ri_add_cast_to(buf, oprright); - if (fkreftype == FKCONSTR_REF_EACH_ELEMENT) - appendStringInfoChar(buf, ')'); ReleaseSysCache(opertup); }