Subject: [PATCH v3 1/1] Add hint message for check_log_destination

From: Japin Li <[email-masked]>
Date: Fri, 7 Jul 2023 15:48:53 +0800

---
 src/backend/utils/error/elog.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 5898100acb..a7545dcbd9 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -2228,8 +2228,22 @@ check_log_destination(char **newval, void **extra, GucSource source)
 #endif
 		else
 		{
+			StringInfoData errhint;
+
+			initStringInfo(&errhint);
+			appendStringInfoString(&errhint, "\"stderr\"");
+#ifdef HAVE_SYSLOG
+			appendStringInfoString(&errhint, ", \"syslog\"");
+#endif
+#ifdef WIN32
+			appendStringInfoString(&errhint, ", \"eventlog\"");
+#endif
+			appendStringInfoString(&errhint, ", \"csvlog\", and \"jsonlog\"");
+
 			GUC_check_errdetail("Unrecognized key word: \"%s\".", tok);
+			GUC_check_errhint("Valid values are combinations of %s.", errhint.data);
 			pfree(rawstring);
+			pfree(errhint.data);
 			list_free(elemlist);
 			return false;
 		}
-- 
2.25.1

--=-=-=
Content-Type: text/plain

-- 
Regrads,
Japin Li.

--=-=-=--