From e983189c5ae64524f724f317f024d6938f6ad271 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Fri, 22 Jul 2022 15:52:11 -0500 Subject: [PATCH v8 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 09353bb613a..0339d2bc722 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -4701,7 +4701,7 @@ AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt) void *newextra = NULL; 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 109e7c5abbd..d0ac2fd4944 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -120,6 +120,7 @@ typedef enum PGC_S_INTERACTIVE, /* dividing line for error reporting */ PGC_S_TEST, /* test per-database or per-user setting */ PGC_S_SESSION, /* SET command */ + // PGC_S_TEST_FILE, /* test global cluster settings (ALTER SYSTEM) */ } GucSource; /* -- 2.42.0