Re: [HACKERS] PATCH: recursive json_populate_record()

Поиск
Список
Период
Сортировка
От Nikita Glukhov
Тема Re: [HACKERS] PATCH: recursive json_populate_record()
Дата
Msg-id 1b72a62e-fd94-fd6d-c573-870af0c8600d@postgrespro.ru
обсуждение исходный текст
Ответ на [HACKERS] PATCH: recursive json_populate_record()  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Ответы Re: [HACKERS] PATCH: recursive json_populate_record()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
 > I've noticed that this patch is on CF and needs a reviewer so I decided
 > to take a look. Code looks good to me in general, it's well covered by
 > tests and passes `make check-world`.

Thanks for your review.

 > However it would be nice to have a little more comments. In my opinion
 > every procedure have to have at least a short description - what it
 > does, what arguments it receives and what it returns, even if it's a
 > static procedure. Same applies for structures and their fields.

I have added some comments for functions and structures in the second 
version of this patch.

 > Another thing that bothers me is a FIXME comment:
 >
 > ```
 > tupdesc = lookup_rowtype_tupdesc(type, typmod); /* FIXME cache */
 > ```
 >
 > I suggest remove it or implement a caching here as planned.

I have implemented tuple descriptor caching here in populate_composite() 
and also in populate_record_worker() (by using populate_composite() 
instead of populate_record()). These improvements can speed up bulk 
jsonb conversion by 15-20% in the simple test with two nested records.

-- 
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] merging some features from plpgsql2 project
Следующее
От: Thomas Munro
Дата:
Сообщение: [HACKERS] Some thoughts about multi-server sync rep configurations