Re: locale and encoding

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Henrique Friedrichs <henriquefriedrichs(at)yahoo(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: locale and encoding
Date: 2005-09-10 11:07:24
Message-ID: 20050910110719.GA23595@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Sep 10, 2005 at 09:37:32AM +0000, Henrique Friedrichs wrote:
> I´m worried about our cluster locale and database enconding setting.
> They´re pt_BR and SQL_ASCII respectively. I would like to change them
> to C and LATIN1 but I don´t know what might the side effects of that
> be?

You can't change the collate or encoding once the database has been
created. You need to dump the db reload it. Encoding is per-database,
LC_COLLATE is per-cluster. Note that encoding and locale have not much
to do with eachother, except they better be compatable otherwise the
sorting will be wrong.

Locale C means basically, "compare binary char values, we don't care
what they mean", which may or may not be what you want. Encoding Latin1
means you're limited to those characters, in particular you'll never be
able to store the Euro symbol for example.

> As I could understand LOCALE is used to determine the order of
> characters and it can´t be changed because indexes depend on it.

There is work going in this area but it's not there yet. For now this
is true.

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2005-09-10 11:14:51 Re: Postgresql Hosting
Previous Message Henrique Friedrichs 2005-09-10 09:37:32 locale and encoding