Re: default locale considered harmful? (was Re: [GENERAL]

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: default locale considered harmful? (was Re: [GENERAL]
Date: 2003-06-05 21:18:04
Message-ID: Pine.LNX.4.33.0306051503470.18444-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 5 Jun 2003, Peter Eisentraut wrote:

> scott.marlowe writes:
>
> > If it comes down to it, we could always require a --locale setting and
> > refuse to initdb without it. That way, whether it's in an RPM or from
> > source, somebody somewhere along the line has to choose something.
>
> By default, you choose when you install or configure your operating
> system. In most cases, the region where you install your operating system
> and the region where you run your database is the same, so equating these
> settings by default is reasonable.

But it's not that simple. If one could flip a switch and change a
postgresql installation from one locale to another, then hey, no big deal.
If indexes on text worked right in other locales it would be no big deal.

If you don't choose locale=C with doing initdb then you
have to backup the whole database, reinitdb, and restore it in order to
switch to it.

If the postgresql engine could use indexes well in all
locales then it would be reasonable to pick up the environmental locale.
As long as locale C is the only one that can use indexes on text, it's not
reasonable to use the locale of the environment without knowing what the
user really wants to do with the database.

Especially since most of the folks I know who download it are going to
prefer a locale of C to en_US or whatnot, since they'll likely want fast
indexed access on text types.

I would at least suggest that certain locales default to be coerced to C
if the user doesn't pick one.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Mayer 2003-06-05 21:22:33 Re: [HACKERS] SAP and MySQL ... [and Benchmark]
Previous Message Peter Eisentraut 2003-06-05 21:15:18 Re: default locale considered harmful? (was Re: [GENERAL]