Re: Patch to improve a few appendStringInfo* calls

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Patch to improve a few appendStringInfo* calls
Дата
Msg-id CAKJS1f93b1_cUwJypmJr7+=ABLh03FyjEb3NnRhiQVuaQSq03Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch to improve a few appendStringInfo* calls  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Patch to improve a few appendStringInfo* calls
Список pgsql-hackers
On 29 May 2015 at 12:51, Peter Eisentraut <peter_e@gmx.net> wrote:
On 5/12/15 4:33 AM, David Rowley wrote:
> Shortly after I sent the previous patch I did a few more searches and
> also found some more things that are not quite right.
> Most of these are to use the binary append method when the length of the
> string is already known.

For these cases it might be better to invent additional functions such
as stringinfo_to_text() and appendStringInfoStringInfo() instead of
repeating the pattern of referring to data and length separately.

You're probably right. It would be nicer to see some sort of wrapper functions that cleaned these up a bit.

I really think that's something for another patch though, this patch just intends to put things the way they're meant to be in the least invasive way possible. What you're proposing is changing the way it's meant to work, which will cause much more code churn.

I've attached a re-based patch.

Regards

David Rowley

--
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
 
Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Sharing aggregate states between different aggregate functions
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Memory Accounting v11