Commit e84c019
committed
Fix maintenance hazards caused by ill-considered use of default: cases.
Remove default cases from assorted switches over ObjectClass and some
related enum types, so that we'll get compiler warnings when someone
adds a new enum value without accounting for it in all these places.
In passing, re-order some switch cases as needed to match the declaration
of enum ObjectClass. OK, that's just neatnik-ism, but I dislike code
that looks like it was assembled with the help of a dartboard.
Discussion: https://postgr.es/m/20170512221010.nglatgt5azzdxjlj@alvherre.pgsql1 parent b5b0db1 commit e84c019
File tree
4 files changed
+259
-180
lines changed- src/backend
- catalog
- commands
4 files changed
+259
-180
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1204 | 1204 | | |
1205 | 1205 | | |
1206 | 1206 | | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1207 | 1211 | | |
1208 | 1212 | | |
1209 | 1213 | | |
| |||
1265 | 1269 | | |
1266 | 1270 | | |
1267 | 1271 | | |
1268 | | - | |
1269 | | - | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
1270 | 1280 | | |
1271 | 1281 | | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1275 | 1286 | | |
1276 | 1287 | | |
1277 | 1288 | | |
| |||
0 commit comments