Обсуждение: How support more native locale in one cluster?

Поиск
Список
Период
Сортировка

How support more native locale in one cluster?

От
Michal Seidl
Дата:
Hi, I can not figure out how to solve the problem with LOCALE. Example:
- 3 tables, each of them with a text or varchar column.
- The first table with text in German
- The second table with text in Czech
- the third one with text in English

How to force Postgre to use correct locale for ORDER BY, LIKE etc
according to language used in table?

Thanks Michal

Re: How support more native locale in one cluster?

От
Karsten Hilbert
Дата:
On Wed, Jul 23, 2008 at 11:49:38PM +0200, Michal Seidl wrote:

> Hi, I can not figure out how to solve the problem with LOCALE. Example:
> - 3 tables, each of them with a text or varchar column.
> - The first table with text in German
> - The second table with text in Czech
> - the third one with text in English
>
> How to force Postgre to use correct locale for ORDER BY, LIKE etc
> according to language used in table?

Unfortunately the answer so far is to either write it
yourself or get someone to write it. PostgreSQL currently
doesn't support this.

Depending on your exact requirements there is some leverage
to be had with judicious use and combination of
cluster/database locale/encoding, text_pattern_ops,
functional indexes and such matters.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

Re: How support more native locale in one cluster?

От
Alvaro Herrera
Дата:
Michal Seidl escribió:
> Hi, I can not figure out how to solve the problem with LOCALE. Example:
> - 3 tables, each of them with a text or varchar column.
> - The first table with text in German
> - The second table with text in Czech
> - the third one with text in English

You cannot do this in existing Postgres versions without external
add-ons (search for pg_strxfrm for this).  There are people working on
this problem; perhaps it will be possible to do it in 8.4, but there's
no promise about that.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.