From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use macro to define the number of enum values
Date: Tue, 01 Oct 2024 13:42:59 +0000
Message-ID: <E1svd9X-001ipi-3b@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/10b721821d6d6e27e594549cf105476dc28514c8
Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c | 4 ++--
src/backend/postmaster/autovacuum.c | 3 ++-
src/bin/pg_dump/pg_backup.h | 3 ++-
src/include/storage/pmsignal.h | 4 ++--
src/include/storage/procsignal.h | 4 ++--
5 files changed, 10 insertions(+), 8 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Use macro to define the number of enum values
In-Reply-To: <E1svd9X-001ipi-3b@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox