Copy name when cloning FKs recurses to partitions
We were passing a string owned by a syscache entry, which was released before recursing. Fix by pstrdup'ing the string. Per buildfarm member prion.
This commit is contained in:
parent
f56f8f8da6
commit
5f6fc34af5
|
@ -8619,7 +8619,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
|
|||
"fkey",
|
||||
RelationGetNamespace(partRel), NIL);
|
||||
else
|
||||
fkconstraint->conname = NameStr(constrForm->conname);
|
||||
fkconstraint->conname = pstrdup(NameStr(constrForm->conname));
|
||||
fkconstraint->fk_upd_action = constrForm->confupdtype;
|
||||
fkconstraint->fk_del_action = constrForm->confdeltype;
|
||||
fkconstraint->deferrable = constrForm->condeferrable;
|
||||
|
|
Loading…
Reference in New Issue