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.