The gneration of the dump clause for functions with TRANSFORM
calls would the memory for holding the result of the Oid
array parsing. Fix by freeing.
While in there, switch to using pg_malloc instead of palloc in
order to be consistent with the rest of the file.
Author: Oleg Tselebrovskiy <
[email protected]>
Reviewed-by: Daniel Gustafsson <[email protected]>Discussion: https://postgr.es/m/
baf1ae4511288e5b421f41e79a3df1a0@postgrespro.ru
if (*protrftypes)
{
- Oid *typeids = palloc(FUNC_MAX_ARGS * sizeof(Oid));
+ Oid *typeids = pg_malloc(FUNC_MAX_ARGS * sizeof(Oid));
int i;
appendPQExpBufferStr(q, " TRANSFORM ");
appendPQExpBuffer(q, "FOR TYPE %s",
getFormattedTypeName(fout, typeids[i], zeroAsNone));
}
+
+ free(typeids);
}
if (prokind[0] == PROKIND_WINDOW)