Re: locale and encoding

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: locale and encoding
Дата
Msg-id 20050910110719.GA23595@svana.org
обсуждение исходный текст
Ответ на locale and encoding  (Henrique Friedrichs <henriquefriedrichs@yahoo.com.br>)
Ответы Re: locale and encoding  (Carlos Henrique Reimer <carlosreimer@yahoo.com.br>)
Список 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@svana.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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Henrique Friedrichs
Дата:
Сообщение: locale and encoding
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Postgresql Hosting