Re: Cleaner API for appendStringInfoVA

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cleaner API for appendStringInfoVA
Дата
Msg-id 11177.1195837436@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cleaner API for appendStringInfoVA  ("Marko Kreen" <markokr@gmail.com>)
Ответы Re: Cleaner API for appendStringInfoVA  ("Marko Kreen" <markokr@gmail.com>)
Список pgsql-patches
"Marko Kreen" <markokr@gmail.com> writes:
> Attached patch moves decision how much more room to allocate
> from callers of appendStringInfoVA to inside the function,
> where more info is available.

This is by no stretch of the imagination "cleaner".

> On systems with broken vsnprintf() it falls back
> to doubleing the buffer.

The problem with this is that you are defining one particular vsnprintf
behavior as "non broken", without any evidence for that opinion.
(Indeed, one could argue that that behavior is contradictory to what
the Single Unix Spec says, although the SUS is a bit vague about it.)

Our own vsnprintf doesn't follow that behavior, for instance, so we
couldn't even get there by forcing it to be used always.

I'd want to see some significant evidence of a performance issue
before considering hacking this up like this.

            regards, tom lane

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plpython crash on exception
Следующее
От: Tom Lane
Дата:
Сообщение: Re: parse_expr.c:typecast_expression:return immediate on NULL input