From: Tom Lane Date: Tue, 22 Mar 2011 21:20:50 +0000 (-0400) Subject: Make initdb ignore locales for client-only encodings. X-Git-Tag: REL9_1_ALPHA5~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d1d679dbf780694673529bd864ca1e258ae50d5;p=postgresql 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. --- 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 */