forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfd958bb
committed
Correctly check updatability of columns targeted by INSERT...DEFAULT.
If a view has some updatable and some non-updatable columns, we failedto verify updatability of any columns for which an INSERT or UPDATEon the view explicitly specifies a DEFAULT item (unless the view hasa declared default for that column, which is rare anyway, and onewould almost certainly not write one for a non-updatable column).This would lead to an unexpected "attribute number N not found inview targetlist" error rather than the intended error.Per bug #18546 from Alexander Lakhin. This bug is old, so back-patchto all supported branches.Discussion:https://postgr.es/m/18546-84a292e759a9361d@postgresql.org1 parent34e9dce commitfd958bb
File tree
3 files changed
+25
-14
lines changed- src
- backend/rewrite
- test/regress
- expected
- sql
3 files changed
+25
-14
lines changedLines changed: 21 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2963 | 2963 |
| |
2964 | 2964 |
| |
2965 | 2965 |
| |
2966 |
| - | |
| 2966 | + | |
2967 | 2967 |
| |
2968 | 2968 |
| |
2969 | 2969 |
| |
| |||
3063 | 3063 |
| |
3064 | 3064 |
| |
3065 | 3065 |
| |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
3066 | 3070 |
| |
3067 | 3071 |
| |
3068 | 3072 |
| |
| |||
3105 | 3109 |
| |
3106 | 3110 |
| |
3107 | 3111 |
| |
3108 |
| - | |
3109 |
| - | |
3110 |
| - | |
3111 |
| - | |
3112 |
| - | |
| 3112 | + | |
3113 | 3113 |
| |
3114 | 3114 |
| |
3115 | 3115 |
| |
3116 |
| - | |
| 3116 | + | |
3117 | 3117 |
| |
3118 | 3118 |
| |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
3119 | 3132 |
| |
3120 | 3133 |
| |
3121 | 3134 |
| |
| |||
3173 | 3186 |
| |
3174 | 3187 |
| |
3175 | 3188 |
| |
3176 |
| - | |
3177 |
| - | |
3178 |
| - | |
3179 | 3189 |
| |
3180 | 3190 |
| |
3181 | 3191 |
| |
| |||
3270 | 3280 |
| |
3271 | 3281 |
| |
3272 | 3282 |
| |
3273 |
| - | |
3274 |
| - | |
3275 |
| - | |
3276 |
| - | |
| 3283 | + | |
3277 | 3284 |
| |
3278 | 3285 |
| |
3279 | 3286 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1598 | 1598 |
| |
1599 | 1599 |
| |
1600 | 1600 |
| |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
1601 | 1604 |
| |
1602 | 1605 |
| |
1603 | 1606 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
845 | 845 |
| |
846 | 846 |
| |
847 | 847 |
| |
| 848 | + | |
848 | 849 |
| |
849 | 850 |
| |
850 | 851 |
| |
|
0 commit comments
Comments
(0)