Fix maintenance hazards caused by ill-considered use of default: cases.
Tom Lane <tgl@sss.pgh.pa.us>
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.pgsql
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/dependency.c | modified | +16 −5 |
| src/backend/catalog/objectaddress.c | modified | +154 −151 |
| src/backend/commands/alter.c | modified | +35 −3 |
| src/backend/commands/event_trigger.c | modified | +54 −21 |
Discussion
- WITH clause in CREATE STATISTICS 46 messages · 2017-04-20 → 2017-05-13