diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index c1a9bda433..2c23371a19 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -14568,7 +14568,8 @@ CloneRowTriggersToPartition(Relation parent, Relation partition) col = TupleDescAttr(parent->rd_att, trigForm->tgattr.values[i] - 1); - cols = lappend(cols, makeString(NameStr(col->attname))); + cols = lappend(cols, + makeString(pstrdup(NameStr(col->attname)))); } }