- Notifications
You must be signed in to change notification settings - Fork28
Commit7aeb640
committed
In INSERT/UPDATE, use the table's real tuple descriptor as target.
This back-patches commit 20d3fe900 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 parent5ca6f68 commit7aeb640
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 | |
---|---|---|---|
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
91 |
| - | |
92 |
| - | |
93 | 91 |
| |
94 | 92 |
| |
95 | 93 |
| |
| |||
2673 | 2671 |
| |
2674 | 2672 |
| |
2675 | 2673 |
| |
2676 |
| - | |
| 2674 | + | |
2677 | 2675 |
| |
2678 | 2676 |
| |
2679 | 2677 |
| |
| |||
3042 | 3040 |
| |
3043 | 3041 |
| |
3044 | 3042 |
| |
3045 |
| - | |
3046 |
| - | |
3047 |
| - | |
3048 |
| - | |
3049 |
| - | |
3050 |
| - | |
3051 |
| - | |
3052 |
| - | |
3053 |
| - | |
3054 |
| - | |
3055 |
| - | |
3056 |
| - | |
3057 |
| - | |
3058 |
| - | |
3059 |
| - | |
3060 |
| - | |
3061 |
| - | |
3062 |
| - | |
3063 |
| - | |
3064 |
| - | |
3065 |
| - | |
3066 |
| - | |
3067 |
| - | |
3068 |
| - | |
3069 |
| - | |
3070 |
| - | |
3071 |
| - | |
3072 |
| - | |
3073 |
| - | |
3074 |
| - | |
3075 |
| - | |
3076 |
| - | |
3077 |
| - | |
3078 |
| - | |
3079 | 3043 |
| |
3080 | 3044 |
| |
3081 | 3045 |
| |
|
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 | |
---|---|---|---|
| |||
2681 | 2681 |
| |
2682 | 2682 |
| |
2683 | 2683 |
| |
2684 |
| - | |
2685 |
| - | |
2686 |
| - | |
2687 | 2684 |
| |
2688 | 2685 |
| |
2689 | 2686 |
| |
2690 | 2687 |
| |
2691 |
| - | |
2692 |
| - | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
2693 | 2705 |
| |
2694 | 2706 |
| |
2695 | 2707 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
| 159 | + | |
| 160 | + | |
| 161 | + | |
159 | 162 |
| |
160 | 163 |
| |
161 | 164 |
| |
|
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)