Re: Internationalization

From: Kasia Tuszynska <ktuszynska(at)esri(dot)com>
To: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, CS DBA <cs_dba(at)consistentstate(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Internationalization
Date: 2014-03-17 21:44:07
Message-ID: 6C308A1FFB24664F8636F3B58ABEF845887198F7@RED-INF-EXMB-P2.esri.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

CS DBA,
If you are storing multiple languages in a Postgres database and you choose UTF-8 and "C" or "POSIX" for the collation parameters, you will indeed be able to store any and all languages, but as Ian said Postgres does not have a switch to tell it to sort an index in a particular language, so your index sorts will come back in ascii order.
If you want sorts in a specific language, you need to create a db with encoding and the two collation parameters specific to that language like German.

Sincerely,
Kasia

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Ian Lawrence Barwick
Sent: Thursday, March 13, 2014 5:58 PM
To: CS DBA
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Internationalization

2014-03-14 6:27 GMT+09:00 CS DBA <cs_dba(at)consistentstate(dot)com>:
> Hi All;
>
> we want to store data in a generic fashion (COLLATION / ENCODING?)
>
> and then define on the fly which language to display it in, as well as
> force that language rules for indexes & sorting. I know how to set
> COLLATION for the sorting / index rules but how would I force the
> select results to be displayed in another language such as French or German?

I'm not quite sure what you want to achieve here. PostgreSQL can't possibly know what language the data in a given column is in, so you'd need to have some kind of identifier (e.g. separate column specifying the language).

A more concrete example of what you want to do would help.

Regards

Ian Barwick

--
Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ian Lawrence Barwick 2014-03-17 21:51:54 Re: looking for doc
Previous Message Kasia Tuszynska 2014-03-17 21:37:08 looking for doc