From 5d1d679dbf780694673529bd864ca1e258ae50d5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 22 Mar 2011 17:20:50 -0400 Subject: [PATCH] Make initdb ignore locales for client-only encodings. While putting such entries into pg_collation is harmless (since backends will ignore entries that don't match the database encoding), it's also useless. --- src/bin/initdb/initdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 98e864d549..4db34e5f2e 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -1638,6 +1638,8 @@ setup_collation(void) skipped++; continue; /* error message printed by pg_get_encoding_from_locale() */ } + if (!PG_VALID_BE_ENCODING(enc)) + continue; /* ignore locales for client-only encodings */ if (enc == PG_SQL_ASCII) continue; /* C/POSIX are already in the catalog */ -- 2.40.0