Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2004-06-02 18:54:48
Subject: Re: Default Locale in initdb
Previous:From: Paul RamseyDate: 2004-06-02 18:16:38
Subject: Re: Default Locale in initdb

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group