forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9695305
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 parentb82791c commit9695305
File tree
3 files changed
+23
-10
lines changed- src
- backend/rewrite
- test/regress
- expected
- sql
3 files changed
+23
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2987 | 2987 | | |
2988 | 2988 | | |
2989 | 2989 | | |
2990 | | - | |
| 2990 | + | |
2991 | 2991 | | |
2992 | 2992 | | |
2993 | 2993 | | |
| |||
3084 | 3084 | | |
3085 | 3085 | | |
3086 | 3086 | | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
3087 | 3090 | | |
3088 | 3091 | | |
3089 | 3092 | | |
| |||
3126 | 3129 | | |
3127 | 3130 | | |
3128 | 3131 | | |
3129 | | - | |
3130 | | - | |
3131 | | - | |
3132 | | - | |
3133 | | - | |
| 3132 | + | |
3134 | 3133 | | |
3135 | 3134 | | |
3136 | 3135 | | |
3137 | | - | |
| 3136 | + | |
3138 | 3137 | | |
3139 | 3138 | | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
3140 | 3152 | | |
3141 | 3153 | | |
3142 | 3154 | | |
| |||
3194 | 3206 | | |
3195 | 3207 | | |
3196 | 3208 | | |
3197 | | - | |
3198 | | - | |
3199 | | - | |
3200 | 3209 | | |
3201 | 3210 | | |
3202 | 3211 | | |
| |||
| 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 | | |
| |||
| 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)