mirror of https://github.com/postgres/postgres
Add missing pstrdup
Lifetime of the input string is not right, so create a separate copy. Author: Amit Langote Discussion: https://postgr.es/m/a2773420-50d1-0a42-3396-fe42b0921134@lab.ntt.co.jp
This commit is contained in:
parent
dfce1f9e4e
commit
bc972072a3
|
@ -14568,7 +14568,8 @@ CloneRowTriggersToPartition(Relation parent, Relation partition)
|
||||||
|
|
||||||
col = TupleDescAttr(parent->rd_att,
|
col = TupleDescAttr(parent->rd_att,
|
||||||
trigForm->tgattr.values[i] - 1);
|
trigForm->tgattr.values[i] - 1);
|
||||||
cols = lappend(cols, makeString(NameStr(col->attname)));
|
cols = lappend(cols,
|
||||||
|
makeString(pstrdup(NameStr(col->attname))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue