Commit a5b153f
committed
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 1345cc6.
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>1 parent 20559a8 commit a5b153f
File tree
3 files changed
+45
-0
lines changed- src
- pl/plpgsql/src
- test/regress
- expected
- sql
3 files changed
+45
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6102 | 6102 | | |
6103 | 6103 | | |
6104 | 6104 | | |
| 6105 | + | |
| 6106 | + | |
6105 | 6107 | | |
6106 | 6108 | | |
6107 | 6109 | | |
| |||
6115 | 6117 | | |
6116 | 6118 | | |
6117 | 6119 | | |
| 6120 | + | |
| 6121 | + | |
6118 | 6122 | | |
6119 | 6123 | | |
6120 | 6124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5643 | 5643 | | |
5644 | 5644 | | |
5645 | 5645 | | |
| 5646 | + | |
| 5647 | + | |
| 5648 | + | |
| 5649 | + | |
| 5650 | + | |
| 5651 | + | |
| 5652 | + | |
| 5653 | + | |
| 5654 | + | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
| 5660 | + | |
| 5661 | + | |
| 5662 | + | |
| 5663 | + | |
| 5664 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4428 | 4428 | | |
4429 | 4429 | | |
4430 | 4430 | | |
| 4431 | + | |
| 4432 | + | |
| 4433 | + | |
| 4434 | + | |
| 4435 | + | |
| 4436 | + | |
| 4437 | + | |
| 4438 | + | |
| 4439 | + | |
| 4440 | + | |
| 4441 | + | |
| 4442 | + | |
| 4443 | + | |
| 4444 | + | |
| 4445 | + | |
| 4446 | + | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
0 commit comments