forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8b39345
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 parentd50e3b1 commit8b39345
2 files changed
+47
-16
lines changedOriginal 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 |
| |
|
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)