diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 8f058604e8c..ee55d214a13 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -7382,7 +7382,6 @@ ATAddForeignKeyConstraint(AlteredTableInfo *tab, Relation rel, new_castfunc == old_castfunc && (!IsPolymorphicType(pfeqop_right) || new_fktype == old_fktype)); - } pfeqoperators[i] = pfeqop; @@ -9911,7 +9910,7 @@ TryReuseForeignKey(Oid oldId, Constraint *con) /* stash a List of the operator Oids in our Constraint node */ for (i = 0; i < numkeys; i++) - con->old_conpfeqop = lcons_oid(rawarr[i], con->old_conpfeqop); + con->old_conpfeqop = lappend_oid(con->old_conpfeqop, rawarr[i]); ReleaseSysCache(tup); }