forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit20d3fe9
committed
In INSERT/UPDATE, use the table's real tuple descriptor as target.
Previously, ExecInitModifyTable relied on ExecInitJunkFilter,and thence ExecCleanTypeFromTL, to build the target descriptor fromthe query tlist. While we just checked (in ExecCheckPlanOutput)that the tlist produces compatible output, this is not a greatsubstitute for the relation's actual tuple descriptor that'savailable from the relcache. For one thing, dropped columns willnot be correctly marked attisdropped; it's a bit surprising thatwe've gotten away with that this long. But the real reason forbeing concerned with this is that using the table's descriptor meansthat the slot will have correct attrmissing data, allowing us torevert the klugy fix of commitba9f18a. (This commit undoesthat one's changes in trigger.c, but keeps the new test case.)Thus we can solve the bogus-trigger-tuple problem with fewer cyclesrather than more.No back-patch, since this doesn't fix any additional bug, and itseems somewhat more likely to have unforeseen side effects thanba9f18a's narrow fix.Discussion:https://postgr.es/m/16644-5da7ef98a7ac4545@postgresql.org1 parentfa42c2e commit20d3fe9
File tree
4 files changed
+55
-50
lines changed- src
- backend
- commands
- executor
- include/executor
4 files changed
+55
-50
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 |
| |
| |||
2674 | 2672 |
| |
2675 | 2673 |
| |
2676 | 2674 |
| |
2677 |
| - | |
| 2675 | + | |
2678 | 2676 |
| |
2679 | 2677 |
| |
2680 | 2678 |
| |
| |||
3043 | 3041 |
| |
3044 | 3042 |
| |
3045 | 3043 |
| |
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 |
| - | |
3080 | 3044 |
| |
3081 | 3045 |
| |
3082 | 3046 |
| |
|
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 | |
---|---|---|---|
| |||
2591 | 2591 |
| |
2592 | 2592 |
| |
2593 | 2593 |
| |
2594 |
| - | |
2595 |
| - | |
2596 |
| - | |
2597 | 2594 |
| |
2598 | 2595 |
| |
2599 | 2596 |
| |
2600 | 2597 |
| |
2601 |
| - | |
2602 |
| - | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
2603 | 2615 |
| |
2604 | 2616 |
| |
2605 | 2617 |
| |
|
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 |
| |
|
0 commit comments
Comments
(0)