pgsql: Modernize result-tuple construction in pltcl_trigger_handler().
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Modernize result-tuple construction in pltcl_trigger_handler(). |
| Дата | |
| Msg-id | E1c3UhY-00032D-MB@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Modernize result-tuple construction in pltcl_trigger_handler(). Use Tcl_ListObjGetElements instead of Tcl_SplitList. Aside from being possibly more efficient in its own right, this means we are no longer responsible for freeing a malloc'd result array, so we can get rid of a PG_TRY/PG_CATCH block. Use heap_form_tuple instead of SPI_modifytuple. We don't need the extra generality of the latter, since we're always replacing all columns. Nor do we need its memory-context-munging, since at this point we're already out of the SPI environment. Per comparison of this code to tuple-building code submitted by Jim Nasby. I've abandoned the thought of merging the two cases into a single routine, but we may as well make the older code simpler and faster where we can. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/2178cbf40d3d75d87ab9b55579ac1cb0621baeff Modified Files -------------- src/pl/tcl/pltcl.c | 167 +++++++++++++++++++++++------------------------------ 1 file changed, 73 insertions(+), 94 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера