Re: buildfarm / handling (undefined) locales

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: buildfarm / handling (undefined) locales
Дата
Msg-id 17725.1400077197@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: buildfarm / handling (undefined) locales  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: buildfarm / handling (undefined) locales
Re: buildfarm / handling (undefined) locales
Список pgsql-hackers
Heikki Linnakangas <hlinnakangas@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Zhe-Wei Jiang
Дата:
Сообщение: Re: Wanna help PostgreSQL
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: popen and pclose redefinitions causing many warning in Windows build