diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index a92dccb..ef5af25 100644 --- a/src/backend/postmaster/syslogger.c +++ b/src/backend/postmaster/syslogger.c @@ -45,6 +45,7 @@ #include "storage/latch.h" #include "storage/pg_shmem.h" #include "utils/guc.h" +#include "utils/guc_values.h" #include "utils/ps_status.h" #include "utils/timestamp.h" @@ -1409,7 +1410,7 @@ update_metainfo_datafile() if (last_file_name && (Log_destination & LOG_DESTINATION_STDERR)) { - if (fprintf(fh, "stderr %s\n", last_file_name) < 0) + if (fprintf(fh, GUCV_STDERR " %s\n", last_file_name) < 0) { ereport(LOG, (errcode_for_file_access(), @@ -1422,7 +1423,7 @@ update_metainfo_datafile() if (last_csv_file_name && (Log_destination & LOG_DESTINATION_CSVLOG)) { - if (fprintf(fh, "csvlog %s\n", last_csv_file_name) < 0) + if (fprintf(fh, GUCV_CSVLOG " %s\n", last_csv_file_name) < 0) { ereport(LOG, (errcode_for_file_access(), diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c index 68dd66f..f38876f 100644 --- a/src/backend/utils/adt/misc.c +++ b/src/backend/utils/adt/misc.c @@ -42,6 +42,7 @@ #include "tcop/tcopprot.h" #include "utils/acl.h" #include "utils/builtins.h" +#include "utils/guc_values.h" #include "utils/timestamp.h" #define atooid(x) ((Oid) strtoul((x), NULL, 10)) @@ -911,13 +912,14 @@ pg_current_logfile(PG_FUNCTION_ARGS) else { logfmt = text_to_cstring(PG_GETARG_TEXT_PP(0)); - if (strcmp(logfmt, "stderr") != 0 && strcmp(logfmt, "csvlog") != 0) + if (strcmp(logfmt, GUCV_STDERR) != 0 && + strcmp(logfmt, GUCV_CSVLOG) != 0) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("log format \"%s\" is not supported", logfmt), - errhint("The supported log formats are \"stderr\"" - " and \"csvlog\"."))); + errhint("The supported log formats are \"" GUCV_STDERR + " and \"" GUCV_CSVLOG "\"."))); PG_RETURN_NULL(); } }