From 3482dd6408a591361bf8b16715eb1ddf66085ae1 Mon Sep 17 00:00:00 2001 From: zhengxue Date: Tue, 8 Dec 2020 10:39:26 +0800 Subject: [PATCH] sopport the parameter with the same name in postgresql.conf --- src/common/backend/utils/misc/guc.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/common/backend/utils/misc/guc.cpp b/src/common/backend/utils/misc/guc.cpp index 1372ca763..3bf978484 100644 --- a/src/common/backend/utils/misc/guc.cpp +++ b/src/common/backend/utils/misc/guc.cpp @@ -21550,12 +21550,9 @@ int find_guc_option( } } - /* The line of last one will be returned */ - if (matchTimes > 0) { - return targetLine; - } - - return INVALID_LINES_IDX; + /* The line of last one will be returned, otherwise it return invaild line */ + return (matchTimes > 0) ? targetLine : INVALID_LINES_IDX; + } /* * @@GaussDB@@