forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit220003b
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 parent8720a15 commit220003b
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 | |
---|---|---|---|
| |||
2986 | 2986 |
| |
2987 | 2987 |
| |
2988 | 2988 |
| |
2989 |
| - | |
| 2989 | + | |
2990 | 2990 |
| |
2991 | 2991 |
| |
2992 | 2992 |
| |
| |||
3186 | 3186 |
| |
3187 | 3187 |
| |
3188 | 3188 |
| |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
3189 | 3193 |
| |
3190 | 3194 |
| |
3191 | 3195 |
| |
| |||
3225 | 3229 |
| |
3226 | 3230 |
| |
3227 | 3231 |
| |
3228 |
| - | |
3229 |
| - | |
3230 |
| - | |
3231 |
| - | |
3232 |
| - | |
| 3232 | + | |
3233 | 3233 |
| |
3234 | 3234 |
| |
3235 | 3235 |
| |
3236 |
| - | |
| 3236 | + | |
3237 | 3237 |
| |
3238 | 3238 |
| |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
3239 | 3252 |
| |
3240 | 3253 |
| |
3241 | 3254 |
| |
| |||
3337 | 3350 |
| |
3338 | 3351 |
| |
3339 | 3352 |
| |
3340 |
| - | |
3341 |
| - | |
3342 |
| - | |
3343 | 3353 |
| |
3344 | 3354 |
| |
3345 | 3355 |
| |
| |||
3434 | 3444 |
| |
3435 | 3445 |
| |
3436 | 3446 |
| |
3437 |
| - | |
3438 |
| - | |
3439 |
| - | |
3440 |
| - | |
| 3447 | + | |
3441 | 3448 |
| |
3442 | 3449 |
| |
3443 | 3450 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2101 | 2101 |
| |
2102 | 2102 |
| |
2103 | 2103 |
| |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
2104 | 2107 |
| |
2105 | 2108 |
| |
2106 | 2109 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1111 | 1111 |
| |
1112 | 1112 |
| |
1113 | 1113 |
| |
| 1114 | + | |
1114 | 1115 |
| |
1115 | 1116 |
| |
1116 | 1117 |
| |
|
0 commit comments
Comments
(0)