Re: Patch to improve a few appendStringInfo* calls

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Patch to improve a few appendStringInfo* calls
Дата
Msg-id CA+Tgmobma9tyOP5R5Ujxkxzq0Fx0BAoCWn77TniV3cQ0G+8MkA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch to improve a few appendStringInfo* calls  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Dec 21, 2015 at 6:28 PM, David Rowley
<david.rowley@2ndquadrant.com> wrote:
>  According to grep -rE "appendStringInfoString\(.*\.data\);" . we have 13
> such matches. None of them seem to be in very performance critical places,
> perhaps with the exception of xmlconcat().
>
> Would you say that we should build a macro to wrap up a call to
> appendBinaryStringInfo() or invent another function which looks similar?

The macro probably would have a multiple evaluation hazard, so I'd be
inclined to invent a function.  I mean, yeah, you could use a do {  }
while (0) block to fix the multiple evaluation, but complex macros are
harder to read than functions, and not necessarily any faster.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fix for readline terminal size problems when window is resized with open pager
Следующее
От: Robert Haas
Дата:
Сообщение: Re: A typo in syncrep.c