Re: Translations in the distributions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Translations in the distributions
Date
Msg-id 24170.1073663973@sss.pgh.pa.us
Whole thread Raw
In response to Translations in the distributions  (Dennis Björklund <db@zigo.dhs.org>)
Responses Re: Translations in the distributions
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Am Freitag, 9. Januar 2004 15:51 schrieb Tom Lane:
>> Hmm.  So the problem would appear if LC_CTYPE is different from the
>> database encoding?  Could we fix it by forcing LC_CTYPE to the database
>> encoding during startup?

> That would resolve quite a few problems, but I don't think there's a way to 
> know what encoding a given LC_CTYPE value will result in.

Hmm.  Actually it looks like we already do what I had in mind:

ReadControlFile():if (setlocale(LC_CTYPE, ControlFile->lc_ctype) == NULL)    ereport(FATAL, ...

So the problem really occurs when database_encoding is set to an
encoding that is incompatible with the one implied by the initdb-time
LC_CTYPE ... which we have no good way to check.  Ugh.

I have some vague recollection that glibc offers an API extension that
allows this to be checked.  Is it worth having a solution that catches
the problem on glibc only?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Potuganti Ramu
Date:
Subject: "with grant option" for user groups.
Next
From: Peter Eisentraut
Date:
Subject: Re: "with grant option" for user groups.