diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 2e792edbcf..0c0ddd58c5 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -7926,7 +7926,6 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel, new_castfunc == old_castfunc && (!IsPolymorphicType(pfeqop_right) || new_fktype == old_fktype)); - } pfeqoperators[i] = pfeqop; @@ -11478,7 +11477,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); }