Re: C locale sort in src/tools/make_ctags - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: C locale sort in src/tools/make_ctags
Date
Msg-id 200402021646.47059.peter_e@gmx.net
Whole thread Raw
In response to Re: C locale sort in src/tools/make_ctags  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: C locale sort in src/tools/make_ctags
List 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 by date:

Previous
From: David Fetter
Date:
Subject: Re: Patch for psql startup clarity
Next
From: Tom Lane
Date:
Subject: Re: C locale sort in src/tools/make_ctags