Commit Graph

3 Commits

Author SHA1 Message Date
Tom Lane d5459671a3 Teach chklocale.c about a few names for frontend-only encodings,
since this will allow initdb to reject attempts to initdb in a locale
that uses such an encoding.  We'll probably find out more such names
during beta ...
2007-09-29 00:01:43 +00:00
Tom Lane 1f32999039 On OS X, assume that an empty-string result for nl_langinfo(CODESET)
means UTF-8.  Per examination of /usr/share/locale in 10.4.10.
2007-09-28 23:36:06 +00:00
Tom Lane 70b9b9b788 Change initdb and CREATE DATABASE to actively reject attempts to create
databases with encodings that are incompatible with the server's LC_CTYPE
locale, when we can determine that (which we can on most modern platforms,
I believe).  C/POSIX locale is compatible with all encodings, of course,
so there is still some usefulness to CREATE DATABASE's ENCODING option,
but this will insulate us against all sorts of recurring complaints
caused by mismatched settings.

I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into
a new src/port/ file so it could be shared by CREATE DATABASE.
2007-09-28 22:25:49 +00:00