Re: initdb "Fails to initialize lc_time" (using 7.3.1) - Mailing list pgsql-admin

From Peter Eisentraut
Subject Re: initdb "Fails to initialize lc_time" (using 7.3.1)
Date
Msg-id Pine.LNX.4.44.0208082149080.927-100000@localhost.localdomain
Whole thread Raw
In response to Re: initdb "Fails to initialize lc_time" (using 7.3.1)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: initdb "Fails to initialize lc_time" (using 7.3.1)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Tom Lane writes:

> The trigger for this problem is that you have LANG = en_US in your
> environment, but it seems that OS X doesn't really support that setting
> fully.  At least setlocale() rejects it for the MONETARY, NUMERIC, and
> TIME categories.

We should probably catch this during initdb.  Maybe I'll get to rewriting
it in C and then we can share the routines.

> Also, although initdb --no-locale gets around the startup failure, you
> still see all the "Failed to initialize" chatter.  This is because
> initdb massages its own variables but doesn't unset LANG when you use
> that option.  Peter, why did you set up initdb's locale switches that
> way?  Why don't you have them set/unset the standard environment
> variable names, so that the effects are actually seen by programs called
> by initdb?

Generally, because there's no reason to, because we're only interested in
collate and ctype.

Specifically, if my environment is set to locale A and I initialize a
cluster with locale B, I still want the possible error messages of
"postgres -boot" to come out in locale A.

--
Peter Eisentraut   peter_e@gmx.net


pgsql-admin by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Postgres performance slowly gets worse over a month
Next
From: Bruce Momjian
Date:
Subject: Re: Automated database backups and authentication