Heikki Linnakangas <hlinnakan...@vmware.com> writes: > On 05/14/2014 12:07 AM, Tom Lane wrote: >> Well, all we know is that we asked setlocale for the default locale from >> the environment and it failed. We don't really know which variable(s) >> it looked at.
> Printing the values of the environment variables sounds complicated, but > I think a generic hint along these lines would be good: > initdb: environment locale settings are invalid > HINT: This usually means that the LANG, LC_ALL or LC_* environment > variable has an invalid value. Hm. Keep in mind this is not backend code so we don't have a HINT formalism. How about initdb: invalid locale settings; check LANG and LC_* environment variables > Specifically mentioning those environment variables by name would be > very helpful to the user. They are specified by POSIX: > http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html, so they're > not that platform-specific. Windows is a different story, though. I seem to recall having heard that some implementations check LANGUAGE and perhaps other spellings as well. Still, this might be better than assuming the user has a clue what to check. As far as Windows goes, we could certainly use #ifdef WIN32 to print some different text, if anyone can write down what it should be. Anyway, given that we seem to have consensus on doing this (modulo exact text of the error message), the next question is whether we want to change this only in HEAD, or consider it a back-patchable bug fix. I lean to the former but can see that there's some argument for the latter. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers