forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbf6cc19
committed
Force tuple conversion when the source has missing attributes.
Tuple conversion incorrectly concluded that no conversion was neededas long as all the attributes lined up. But if the source tuple has amissing attribute (from addition of a column with default), then thedestination tupdesc might not reflect the same default. The typicalsymptom was that the affected columns would be unexpectedly NULL.Repair by always forcing conversion if the source has missingattributes, which will be filled in by the deform operation. (Intheory we could optimize for when the destination has the samedefault, but that seemed overkill.)Backpatch to 11 where missing attributes were added.Per bug #16242.Vik Fearing (discovery, code, testing) and me (analysis, testcase).Discussion:https://postgr.es/m/16242-d1c9fca28445966b@postgresql.org1 parent15d13e8 commitbf6cc19
File tree
3 files changed
+85
-4
lines changed- src
- backend/access/common
- test/regress
- expected
- sql
3 files changed
+85
-4
lines changedLines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
294 | 294 |
| |
295 | 295 |
| |
296 | 296 |
| |
297 |
| - | |
298 |
| - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
299 | 305 |
| |
300 | 306 |
| |
301 | 307 |
| |
| |||
305 | 311 |
| |
306 | 312 |
| |
307 | 313 |
| |
308 |
| - | |
309 |
| - | |
310 | 314 |
| |
311 | 315 |
| |
312 | 316 |
| |
|
Lines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4258 | 4258 |
| |
4259 | 4259 |
| |
4260 | 4260 |
| |
| 4261 | + | |
| 4262 | + | |
| 4263 | + | |
| 4264 | + | |
| 4265 | + | |
| 4266 | + | |
| 4267 | + | |
| 4268 | + | |
| 4269 | + | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
| 4273 | + | |
| 4274 | + | |
| 4275 | + | |
| 4276 | + | |
| 4277 | + | |
| 4278 | + | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
| 4295 | + | |
| 4296 | + | |
| 4297 | + | |
| 4298 | + |
Lines changed: 39 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2801 | 2801 |
| |
2802 | 2802 |
| |
2803 | 2803 |
| |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + |
0 commit comments
Comments
(0)