From 8f7868f73e04819ad3e0ace964882856639892e2 Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Fri, 26 Sep 2025 17:39:17 +0200 Subject: [PATCH] PG-1907 Use macro to define the number of enum values This commet address refactoring made in PostgreSQL codebase in commit 10b7218. --- pg_stat_monitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pg_stat_monitor.h b/pg_stat_monitor.h index da18296..22a5a38 100644 --- a/pg_stat_monitor.h +++ b/pg_stat_monitor.h @@ -152,10 +152,10 @@ typedef enum pgsmStoreKind PGSM_EXEC, PGSM_STORE, PGSM_ERROR, - - PGSM_NUMKIND /* Must be last value of this enum */ } pgsmStoreKind; +#define PGSM_NUMKIND (PGSM_ERROR + 1) + /* the assumption of query max nested level */ #define DEFAULT_MAX_NESTED_LEVEL 10