Re: WIP patch: convert SQL-language functions to return tuplestores
Вложения
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: WIP patch: convert SQL-language functions to return tuplestores |
| Дата | |
| Msg-id | 5036.1225469794@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: WIP patch: convert SQL-language functions to return tuplestores (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: WIP patch: convert SQL-language functions to return tuplestores
|
| Список | pgsql-hackers |
With the attached patch, SQL functions support returning the results of
INSERT/UPDATE/DELETE RETURNING clauses. An INSERT/UPDATE/DELETE
statement is always executed to completion before returning (including
firing any related triggers or rules), so we always materialize the
RETURNING output. When the function result comes from a SELECT, we
continue to use value-per-call mode when being called from
ExecMakeFunctionResult (thus preserving the prior behavior if the
calling query doesn't execute to completion). When called from
ExecMakeTableFunctionResult, we materialize the output and return the
tuplestore in one call. This is also the same behavior as before,
since ExecMakeTableFunctionResult would've filled a tuplestore anyway;
but it's noticeably faster because a lot of call/return and executor
entry overhead is eliminated.
This is code-complete but I haven't touched the docs yet. Barring
objections, I plan to commit when I've finished fixing the docs.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера