pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg |
| Дата | |
| Msg-id | E1c3Qx1-0007D7-R7@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Need to do SPI_push/SPI_pop around expression evaluation in plpgsql. We must do this in case the expression evaluation results in calling another plpgsql function (or, really, anything using SPI). I missed the need for this when I converted exec_cast_value() from doing a simple InputFunctionCall() to doing ExecEvalExpr() in commit 1345cc67b. There is a SPI_push_conditional in InputFunctionCall(), so that there was no bug before that. Per bug #14414 from Marcos Castedo. Add a regression test based on his example, which was that a plpgsql function in a domain check constraint didn't work when assigning to a domain-type variable within plpgsql. Report: <20161106010947.1387.66380@wrigleys.postgresql.org> Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/fc8b81a291bf7e1acfcbd40ed344f323f1e93a94 Modified Files -------------- src/pl/plpgsql/src/pl_exec.c | 4 ++++ src/test/regress/expected/plpgsql.out | 19 +++++++++++++++++++ src/test/regress/sql/plpgsql.sql | 22 ++++++++++++++++++++++ 3 files changed, 45 insertions(+)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера