Re: C locale sort in src/tools/make_ctags

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: ntufar(at)pisem(dot)net, "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: C locale sort in src/tools/make_ctags
Date: 2004-02-02 15:46:47
Message-ID: 200402021646.47059.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-02-02 16:08:49 Re: C locale sort in src/tools/make_ctags
Previous Message David Fetter 2004-02-02 15:12:23 Re: Patch for psql startup clarity