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
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 */
return "min";
default:
elog(ERROR, "unrecognized GUC units value: %d",
- flags & (GUC_UNIT_MEMORY | GUC_UNIT_TIME));
+ flags & GUC_UNIT);
return NULL;
}
}