Re: Default Locale in initdb

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: pgsql(at)mohawksoft(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Default Locale in initdb
Date: 2004-06-02 18:35:02
Message-ID: 20040602113028.F56302@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2 Jun 2004 pgsql(at)mohawksoft(dot)com wrote:

> Is it me or has the default locale of created databases change at some point?
>
> Currently, on Linux, if one does not specify a locale, the locale is taken
> from the system environment and it is not "C."
>
> While I can both sides of a discussion, I think that choosing a "locale"
> without one being specified is a bad idea, even if it is the locale of the
> machine. The reason why it is a bad idea is that certain features of the
> database which only work correctly with a locale of "C" will not work by
> default.

The same is true with not taking the locale. Other unix applications will
sort "correctly" without additional work, but PostgreSQL will not. The
LIKE optimization can be "fixed" in recent versions by adding an index and
leaving the locale, but getting correct sorting is going to require a
reinitdb.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-06-02 18:54:48 Re: Default Locale in initdb
Previous Message Paul Ramsey 2004-06-02 18:16:38 Re: Default Locale in initdb