appendPQExpBufferVA vs appendStringInfoVA

Поиск
Список
Период
Сортировка
От David Rowley
Тема appendPQExpBufferVA vs appendStringInfoVA
Дата
Msg-id CAApHDvqcnkQNqqLzAhDMaP1TcRkhgHb4EPrYSq51DAgnmxPCPQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: appendPQExpBufferVA vs appendStringInfoVA  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom commited some changes to appendStringInfoVA a few weeks ago which allows it to return the required buffer size if the current buffer is not big enough.

On looking at appendPQExpBufferVA I'm thinking it would be nice if it could make use of the new pvsnprintf function to bring the same potential performance improvement in to there too. My vision of how appendPQExpBufferVA would look after the change is pretty much exactly the same as appendStringInfoVA, which make me think... Why do we even have appendPQExpBufferVA ? The only reason that I can think of is that it is used in front end applications and allocates memory differently... Is this the only reason or is there some other special reason for this function that I can't think of?

If someone wants to give me some guidance on how or if all this should re-factored, I'll happily supply a patch. 

Regards

David Rowley

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #8573: int4range memory consumption
Следующее
От: Tom Lane
Дата:
Сообщение: Re: appendPQExpBufferVA vs appendStringInfoVA