postgres.git / summary / log / commit / refs
commit 5d1d679dbf780694673529bd864ca1e258ae50d5
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue Mar 22 21:20:50 2011 +0000
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 98e864d5495..4db34e5f2ea 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 */
[parent: 6e197cb2e537]