forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1353b11
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 parent97ce4d3 commit1353b11
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 | |
---|---|---|---|
| |||
8141 | 8141 |
| |
8142 | 8142 |
| |
8143 | 8143 |
| |
8144 |
| - | |
8145 |
| - | |
8146 |
| - | |
8147 |
| - | |
| 8144 | + | |
| 8145 | + | |
| 8146 | + | |
| 8147 | + | |
| 8148 | + | |
| 8149 | + | |
8148 | 8150 |
| |
8149 | 8151 |
| |
8150 | 8152 |
| |
| |||
8162 | 8164 |
| |
8163 | 8165 |
| |
8164 | 8166 |
| |
8165 |
| - | |
| 8167 | + | |
8166 | 8168 |
| |
8167 | 8169 |
| |
8168 | 8170 |
| |
|
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)