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:
Alvaro Herrera 2018-04-23 11:50:21 -03:00
parent dfce1f9e4e
commit bc972072a3
1 changed files with 2 additions and 1 deletions

View File

@ -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))));
} }
} }