pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg 3+ messages / 1 participants [nested] [flat]
* pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg @ 2016-11-06 17:09 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2016-11-06 17:09 UTC (permalink / raw) To: 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(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg @ 2016-11-06 17:09 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2016-11-06 17:09 UTC (permalink / raw) To: 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 ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/a5b153ff51945034467adbfef1aa0e8f8c1e3267 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(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg @ 2016-11-06 17:09 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2016-11-06 17:09 UTC (permalink / raw) To: 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 ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/674877e93a1b9217c692a5671e1118136959ee74 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(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2016-11-06 17:09 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-11-06 17:09 pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg Tom Lane <tgl@sss.pgh.pa.us> 2016-11-06 17:09 pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg Tom Lane <tgl@sss.pgh.pa.us> 2016-11-06 17:09 pgsql: Need to do SPI_push/SPI_pop around expression evaluation in plpg Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox