Re: initdb "Fails to initialize lc_time" (using 7.3.1)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Drew Wilson <amw(at)speakeasy(dot)net>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: initdb "Fails to initialize lc_time" (using 7.3.1)
Date: 2002-08-08 21:19:29
Message-ID: Pine.LNX.4.44.0208082149080.927-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2002-08-08 22:43:40 Re: Automated database backups and authentication
Previous Message Andrew Sullivan 2002-08-08 20:55:54 Re: Postgres performance slowly gets worse over a month