- Notifications
You must be signed in to change notification settings - Fork5.3k
Commit7fe312f
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 parentc5c239e commit7fe312f
File tree
3 files changed
+30
-5
lines changed- src/pl/plpgsql/src
- expected
- sql
3 files changed
+30
-5
lines changed| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8302 | 8302 | | |
8303 | 8303 | | |
8304 | 8304 | | |
8305 | | - | |
8306 | | - | |
8307 | | - | |
8308 | | - | |
| 8305 | + | |
| 8306 | + | |
| 8307 | + | |
| 8308 | + | |
| 8309 | + | |
| 8310 | + | |
8309 | 8311 | | |
8310 | 8312 | | |
8311 | 8313 | | |
| |||
8323 | 8325 | | |
8324 | 8326 | | |
8325 | 8327 | | |
8326 | | - | |
| 8328 | + | |
8327 | 8329 | | |
8328 | 8330 | | |
8329 | 8331 | | |
| |||
| 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)