From aa4c3ae08b3379bcd222e00aa896a40f811155a5 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Fri, 22 Jul 2022 15:52:11 -0500 Subject: [PATCH 1/4] WIP: test GUCs from ALTER SYSTEM as PGC_S_TEST not FILE WIP: ALTER SYSTEM should use PGC_S_TEST rather than PGC_S_FILE Since the value didn't come from a file. Or maybe we should have another PGC_S_ value for this, or a flag for 'is a test'. --- src/backend/utils/misc/guc.c | 2 +- src/include/utils/guc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 5308896c87f..dda54310a56 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -4540,7 +4540,7 @@ AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt) /* Check that it's acceptable for the indicated parameter */ if (!parse_and_validate_value(record, name, value, - PGC_S_FILE, ERROR, + PGC_S_TEST, ERROR, &newval, &newextra)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index d5253c7ed23..bd45d40c106 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -119,6 +119,7 @@ typedef enum PGC_S_OVERRIDE, /* special case to forcibly set default */ PGC_S_INTERACTIVE, /* dividing line for error reporting */ PGC_S_TEST, /* test per-database or per-user setting */ + // PGC_S_TEST_FILE, /* test global cluster settings (ALTER SYSTEM) */ PGC_S_SESSION /* SET command */ } GucSource; -- 2.34.1