Use the right appendStringInfoVA interface
pgut version renamed to avoid confusion with the server version. (I wonder why there is such a duplication of interfaces and implementations there though...)
This commit is contained in:
@ -29,11 +29,20 @@ termStringInfo(StringInfo str)
|
||||
static void
|
||||
appendStringInfoVA_s(StringInfo str, const char *fmt, va_list args)
|
||||
{
|
||||
#if PG_VERSION_NUM >= 90400
|
||||
int needed;
|
||||
while ((needed = appendStringInfoVA(str, fmt, args)) > 0)
|
||||
{
|
||||
/* Double the buffer size and try again. */
|
||||
enlargeStringInfo(str, needed);
|
||||
}
|
||||
#else
|
||||
while (!appendStringInfoVA(str, fmt, args))
|
||||
{
|
||||
/* Double the buffer size and try again. */
|
||||
enlargeStringInfo(str, str->maxlen);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* simple execute */
|
||||
|
Reference in New Issue
Block a user