forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit23cccb1
committed
Fix for dropped columns in a partitioned table's default partition
We forgot to map column numbers to/from the default partition forvarious operations, leading to valid cases failing with spuriouserrors, such asERROR: attribute N of type some_partition has been droppedIt was also possible that the search for conflicting rows in the defaultpartition when attaching another partition would fail to detect some.Secondarily, it was also possible that such a search should be skipped(because the constraint was implied) but wasn't.Fix all this by mapping column numbers when necessary.Reported by: Daniel WilchesAuthor: Amit LangoteDiscussion:https://postgr.es/m/15873-8c61945d6b3ef87c@postgresql.org1 parent74b7cc8 commit23cccb1
File tree
6 files changed
+70
-7
lines changed- src
- backend
- commands
- partitioning
- test/regress
- expected
- sql
6 files changed
+70
-7
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15682 | 15682 |
| |
15683 | 15683 |
| |
15684 | 15684 |
| |
| 15685 | + | |
| 15686 | + | |
| 15687 | + | |
| 15688 | + | |
| 15689 | + | |
| 15690 | + | |
| 15691 | + | |
15685 | 15692 |
| |
15686 | 15693 |
| |
15687 | 15694 |
| |
|
Lines changed: 19 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1237 | 1237 |
| |
1238 | 1238 |
| |
1239 | 1239 |
| |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
1240 | 1247 |
| |
1241 | 1248 |
| |
1242 | 1249 |
| |
| |||
1265 | 1272 |
| |
1266 | 1273 |
| |
1267 | 1274 |
| |
1268 |
| - | |
1269 | 1275 |
| |
1270 | 1276 |
| |
1271 | 1277 |
| |
| |||
1280 | 1286 |
| |
1281 | 1287 |
| |
1282 | 1288 |
| |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
1283 | 1298 |
| |
1284 | 1299 |
| |
1285 | 1300 |
| |
| |||
1297 | 1312 |
| |
1298 | 1313 |
| |
1299 | 1314 |
| |
| 1315 | + | |
1300 | 1316 |
| |
| 1317 | + | |
| 1318 | + | |
1301 | 1319 |
| |
1302 | 1320 |
| |
1303 | 1321 |
| |
| |||
1318 | 1336 |
| |
1319 | 1337 |
| |
1320 | 1338 |
| |
1321 |
| - | |
1322 |
| - | |
1323 |
| - | |
1324 |
| - | |
1325 | 1339 |
| |
1326 | 1340 |
| |
1327 | 1341 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4008 | 4008 |
| |
4009 | 4009 |
| |
4010 | 4010 |
| |
4011 |
| - | |
| 4011 | + | |
| 4012 | + | |
4012 | 4013 |
| |
4013 | 4014 |
| |
4014 | 4015 |
| |
| |||
4019 | 4020 |
| |
4020 | 4021 |
| |
4021 | 4022 |
| |
| 4023 | + | |
| 4024 | + | |
| 4025 | + | |
| 4026 | + | |
| 4027 | + | |
| 4028 | + | |
4022 | 4029 |
| |
4023 | 4030 |
| |
4024 | 4031 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1119 | 1119 |
| |
1120 | 1120 |
| |
1121 | 1121 |
| |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + |
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2648 | 2648 |
| |
2649 | 2649 |
| |
2650 | 2650 |
| |
2651 |
| - | |
| 2651 | + | |
| 2652 | + | |
2652 | 2653 |
| |
2653 | 2654 |
| |
2654 | 2655 |
| |
| |||
2660 | 2661 |
| |
2661 | 2662 |
| |
2662 | 2663 |
| |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
2663 | 2670 |
| |
2664 | 2671 |
| |
2665 | 2672 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
856 | 856 |
| |
857 | 857 |
| |
858 | 858 |
| |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + |
0 commit comments
Comments
(0)