- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit0f60e1f
committed
Fix plpgsql's handling of simple expressions in scrollable cursors.
exec_save_simple_expr did not account for the possibility thatstandard_planner would stick a Materialize node atop the planof even a simple Result, if CURSOR_OPT_SCROLL is set. This ledto an "unexpected plan node type" error.This is a very old bug, but it'd only be reached by declaring acursor for a "SELECT simple-expression" query and explicitlymarking it scrollable, which is an odd thing to do. So the lackof prior reports isn't too surprising.Bug: #18859Reported-by: Olleg Samoylov <splarv@ya.ru>Author: Andrei Lepikhov <lepihov@gmail.com>Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/18859-0d5f28ac99a37059@postgresql.orgBackpatch-through: 131 parentc600265 commit0f60e1f
File tree
3 files changed
+30
-5
lines changed- src/pl/plpgsql/src
- expected
- sql
3 files changed
+30
-5
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + |
Lines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8282 | 8282 |
| |
8283 | 8283 |
| |
8284 | 8284 |
| |
8285 |
| - | |
8286 |
| - | |
8287 |
| - | |
8288 |
| - | |
| 8285 | + | |
| 8286 | + | |
| 8287 | + | |
| 8288 | + | |
| 8289 | + | |
| 8290 | + | |
8289 | 8291 |
| |
8290 | 8292 |
| |
8291 | 8293 |
| |
| |||
8303 | 8305 |
| |
8304 | 8306 |
| |
8305 | 8307 |
| |
8306 |
| - | |
| 8308 | + | |
8307 | 8309 |
| |
8308 | 8310 |
| |
8309 | 8311 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + |
0 commit comments
Comments
(0)