Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiko Sawada2023-06-15 08:04:19 +0000
committerMasahiko Sawada2023-06-15 08:04:19 +0000
commita54fc892ad0a5673d75b199128b1f5fcf5e1a41d (patch)
tree4bb7de05be059484d0f062531744e247e4fa0e2a /src/backend
parentc00fbe89dc51c13eae1ca71460bcddfc3dde5081 (diff)
Replace GUC_UNIT_MEMORY|GUC_UNIT_TIME with GUC_UNIT.
We used (GUC_UNIT_MEMORY | GUC_UNIT_TIME) instead of GUC_UNIT some places but we already define it in guc.h. This commit replaces them with GUC_UNIT for better consistency with their surrounding code. Author: Japin Li Reviewed-by: Richard Guo, Michael Paquier, Masahiko Sawada Discussion: https://postgr.es/m/MEYP282MB1669EC0FED922F7A151673ACB65AA@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/utils/misc/guc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index a9033b7a54d..5308896c87f 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2766,7 +2766,7 @@ convert_real_from_base_unit(double base_value, int base_unit,
const char *
get_config_unit_name(int flags)
{
- switch (flags & (GUC_UNIT_MEMORY | GUC_UNIT_TIME))
+ switch (flags & GUC_UNIT)
{
case 0:
return NULL; /* GUC has no units */
@@ -2802,7 +2802,7 @@ get_config_unit_name(int flags)
return "min";
default:
elog(ERROR, "unrecognized GUC units value: %d",
- flags & (GUC_UNIT_MEMORY | GUC_UNIT_TIME));
+ flags & GUC_UNIT);
return NULL;
}
}