forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit94ec005
committed
In INSERT/UPDATE, use the table's real tuple descriptor as target.
This back-patches commit20d3fe9 into the v12 and v13 branches.At the time I thought that commit was not fixing any observablebug, but Bertrand Drouvot showed otherwise: adding a dropped columnto the previously-considered scenario crashes v12 and v13, unless thedropped column happens to be an integer. That is, of course, becausethe tupdesc we derive from the plan output tlist fails to describethe dropped column accurately, so that we'll do the wrong thing witha tuple in which that column isn't NULL.There is no bug in pre-v12 branches because they already did usethe table's real tuple descriptor for any trigger-returned tuple.It seems that this set of bugs can be blamed on the changes thatremoved es_trig_tuple_slot, though I've not attempted to pin thatdown precisely.Although there's no code change needed in HEAD, update the test caseto include a dropped column there too.Discussion:https://postgr.es/m/db5d97c8-f48a-51e2-7b08-b73d5434d425@amazon.comDiscussion:https://postgr.es/m/16644-5da7ef98a7ac4545@postgresql.org1 parent16eadc4 commit94ec005
File tree
6 files changed
+102
-66
lines changed- src
- backend
- commands
- executor
- include/executor
- test/regress
- expected
- sql
6 files changed
+102
-66
lines changedLines changed: 1 addition & 37 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
92 |
| - | |
93 |
| - | |
94 | 92 |
| |
95 | 93 |
| |
96 | 94 |
| |
| |||
3036 | 3034 |
| |
3037 | 3035 |
| |
3038 | 3036 |
| |
3039 |
| - | |
| 3037 | + | |
3040 | 3038 |
| |
3041 | 3039 |
| |
3042 | 3040 |
| |
| |||
3404 | 3402 |
| |
3405 | 3403 |
| |
3406 | 3404 |
| |
3407 |
| - | |
3408 |
| - | |
3409 |
| - | |
3410 |
| - | |
3411 |
| - | |
3412 |
| - | |
3413 |
| - | |
3414 |
| - | |
3415 |
| - | |
3416 |
| - | |
3417 |
| - | |
3418 |
| - | |
3419 |
| - | |
3420 |
| - | |
3421 |
| - | |
3422 |
| - | |
3423 |
| - | |
3424 |
| - | |
3425 |
| - | |
3426 |
| - | |
3427 |
| - | |
3428 |
| - | |
3429 |
| - | |
3430 |
| - | |
3431 |
| - | |
3432 |
| - | |
3433 |
| - | |
3434 |
| - | |
3435 |
| - | |
3436 |
| - | |
3437 |
| - | |
3438 |
| - | |
3439 |
| - | |
3440 |
| - | |
3441 | 3405 |
| |
3442 | 3406 |
| |
3443 | 3407 |
| |
|
Lines changed: 34 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
62 |
| - | |
63 | 62 |
| |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 | 63 |
| |
69 | 64 |
| |
70 | 65 |
| |
71 | 66 |
| |
72 | 67 |
| |
73 | 68 |
| |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
74 | 99 |
| |
75 | 100 |
| |
76 | 101 |
| |
| |||
93 | 118 |
| |
94 | 119 |
| |
95 | 120 |
| |
96 |
| - | |
| 121 | + | |
97 | 122 |
| |
98 | 123 |
| |
99 | 124 |
| |
100 | 125 |
| |
101 | 126 |
| |
102 | 127 |
| |
103 |
| - | |
| 128 | + | |
104 | 129 |
| |
105 | 130 |
| |
106 | 131 |
| |
| 132 | + | |
107 | 133 |
| |
108 | 134 |
| |
109 | 135 |
| |
|
Lines changed: 17 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2660 | 2660 |
| |
2661 | 2661 |
| |
2662 | 2662 |
| |
2663 |
| - | |
2664 |
| - | |
2665 |
| - | |
2666 | 2663 |
| |
2667 | 2664 |
| |
2668 | 2665 |
| |
2669 | 2666 |
| |
2670 |
| - | |
2671 |
| - | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
2672 | 2684 |
| |
2673 | 2685 |
| |
2674 | 2686 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
| 153 | + | |
| 154 | + | |
| 155 | + | |
153 | 156 |
| |
154 | 157 |
| |
155 | 158 |
| |
|
Lines changed: 36 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
219 |
| - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
220 | 223 |
| |
221 | 224 |
| |
222 | 225 |
| |
223 | 226 |
| |
224 | 227 |
| |
225 |
| - | |
226 |
| - | |
227 |
| - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
228 | 250 |
| |
229 | 251 |
| |
230 |
| - | |
| 252 | + | |
231 | 253 |
| |
232 |
| - | |
233 |
| - | |
234 |
| - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
235 | 257 |
| |
236 | 258 |
| |
237 | 259 |
| |
238 |
| - | |
239 |
| - | |
240 |
| - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
241 | 263 |
| |
242 | 264 |
| |
243 | 265 |
| |
244 |
| - | |
245 |
| - | |
246 |
| - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
247 | 269 |
| |
248 | 270 |
| |
249 | 271 |
| |
|
Lines changed: 11 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
158 |
| - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
159 | 162 |
| |
160 | 163 |
| |
161 | 164 |
| |
| |||
164 | 167 |
| |
165 | 168 |
| |
166 | 169 |
| |
167 |
| - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
168 | 177 |
| |
169 | 178 |
| |
170 | 179 |
| |
|
0 commit comments
Comments
(0)