From c5a2c2ce0f1dc3dc8d83f3d8d257c077b0fa4f96 Mon Sep 17 00:00:00 2001
From: Jeff Davis <jeff@j-davis.com>
Date: Fri, 24 Mar 2023 16:09:44 -0700
Subject: [PATCH v9 3/5] initdb: emit message when using default ICU locale.

Helpful to determine from test logs whether the locale came from the
environment or a command-line option.

Discussion: https://postgr.es/m/04182066-7655-344a-b8b7-040b1b2490fb%40enterprisedb.com
---
 src/bin/initdb/initdb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 6c1641e77e..508c522fb7 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -2340,7 +2340,10 @@ setlocales(void)
 #ifdef USE_ICU
 		/* acquire default locale from the environment, if not specified */
 		if (icu_locale == NULL)
+		{
 			icu_locale = default_icu_locale();
+			printf(_("Using default ICU locale \"%s\".\n"), icu_locale);
+		}
 
 		/*
 		 * In supported builds, the ICU locale ID will be checked by the
-- 
2.34.1

