Re: C locale sort in src/tools/make_ctags

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: C locale sort in src/tools/make_ctags
Дата
Msg-id 200402021646.47059.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: C locale sort in src/tools/make_ctags  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: C locale sort in src/tools/make_ctags  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
> I saw that, but it seemed a non-problem to me: if the variables have
> not been exported then they won't affect the sort program anyway.

He probably had LANG, but not LC_ALL, already exported in his
environment.  So when the shell program writes:

LC_ALL=C

then sort doesn't see it, because it is not exported, but LANG is still
exported with the value he doesn't want.  The solution is to export
LC_ALL.

> I tried to reproduce Nicolai's statement about LC_ALL not being
> sufficient, but AFAICT Fedora Core 1 handles this as expected:
>
> $ cat /etc/redhat-release
> Fedora Core release 1 (Yarrow)
> $ LANG=en_US LC_ALL=en_GB locale

You have both LC_ALL and LANG exported.

> What I suspect is that Nicolai's environment supplies an explicit
> value for LC_COLLATE, overriding both LC_ALL and LANG.  If we want to
> be bulletproof against that, then none of the proposals in this
> thread are correct, and the correct patch is

That's not possible, because LC_ALL overrides everything.


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Patch for psql startup clarity
Следующее
От: Tom Lane
Дата:
Сообщение: Re: C locale sort in src/tools/make_ctags