Re: [COMMITTERS] pgsql: Clean up jsonb code.

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [COMMITTERS] pgsql: Clean up jsonb code.
Дата
Msg-id CAM3SWZS04Ff=6TxN81Gf9Pi5YMwXdod+HeQ84Fq+WgAtW_fKpg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Clean up jsonb code.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [COMMITTERS] pgsql: Clean up jsonb code.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, May 9, 2014 at 2:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> However, what it looks to me like we've got here is a very bad
> reimplementation of StringInfo buffers.  There is for example no
> integer-overflow checking here.  Rather than try to bring this code
> up to speed, I think we should rip it out and use StringInfo.

Heikki did specifically consider StringInfo buffers and said they were
not best suited to the task at hand. At the time I thought he meant
that he'd do something domain-specific to avoid unnecessary geometric
growth in the size of the buffer (I like to grow buffers to either
twice their previous size, or just big enough to fit the next thing,
whichever is larger), but that doesn't appear to be the case. Still,
it would be good to know what he meant before proceeding. It probably
had something to do with alignment.

Integer overflow checking probably isn't strictly necessary FWIW,
because there are limits to the size that the buffer can grow to
enforced at various points.

-- 
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Clean up jsonb code.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Clean up jsonb code.