Skip to content

Commit 5f6fc34

Browse files
committed
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.
1 parent f56f8f8 commit 5f6fc34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8619,7 +8619,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
86198619
"fkey",
86208620
RelationGetNamespace(partRel), NIL);
86218621
else
8622-
fkconstraint->conname = NameStr(constrForm->conname);
8622+
fkconstraint->conname = pstrdup(NameStr(constrForm->conname));
86238623
fkconstraint->fk_upd_action = constrForm->confupdtype;
86248624
fkconstraint->fk_del_action = constrForm->confdeltype;
86258625
fkconstraint->deferrable = constrForm->condeferrable;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy