Use macro to define the number of enum values
Peter Eisentraut <peter@eisentraut.org>
Use macro to define the number of enum values Refactoring in the interest of code consistency, a follow-up to 2e068db56e31. The argument against inserting a special enum value at the end of the enum definition is that a switch statement might generate a compiler warning unless it has a default clause. Aleksander Alekseev, reviewed by Michael Paquier, Dean Rasheed, Peter Eisentraut Discussion: https://postgr.es/m/CAJ7c6TMsiaV5urU_Pq6zJ2tXPDwk69-NKVh4AMN5XrRiM7N%2BGA%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/pg_stat_statements.c | modified | +2 −2 |
| src/backend/postmaster/autovacuum.c | modified | +2 −1 |
| src/bin/pg_dump/pg_backup.h | modified | +2 −1 |
| src/include/storage/pmsignal.h | modified | +2 −2 |
| src/include/storage/procsignal.h | modified | +2 −2 |
Discussion
- [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS 11 messages · 2024-04-16 → 2024-10-01