]> granicus.if.org Git - postgresql/commitdiff
Make initdb ignore locales for client-only encodings.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 Mar 2011 21:20:50 +0000 (17:20 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 22 Mar 2011 21:20:50 +0000 (17:20 -0400)
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

index 98e864d54953ee46207463dfffbe65e21d843e22..4db34e5f2ea408523921b728902da4992713d6f5 100644 (file)
@@ -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 */