Re: tsearch in core patch

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: teodor(at)sigaev(dot)ru
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hannu Krosing <hannu(at)skype(dot)net>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tsearch in core patch
Date: 2007-06-22 15:52:42
Message-ID: 20070622155242.GL8949@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

teodor(at)sigaev(dot)ru wrote:

> So, final propose:
> rename cfglocale to cfglanguages and store in it array of laguage names
> which is produced from first part of locale names:
> russian '{ru_RU, Russian_Russia}'
> spanish '{es_ES, es_CL, Spanish_Spain, Spanish_Chile}'
>
> Comments?

Why not do it the other way around?
es_ES spanish
Spanish_Spain spanish
ru_RU russian
pt_BR portuguese_brazil

That way you don't need any funny index. Or do you need the list of
locales for each language? (but even if you do, you can easily obtain it
by indexing both columns separately using btrees anyway)

--
Alvaro Herrera http://www.PlanetPostgreSQL.org/
"I can see support will not be a problem. 10 out of 10." (Simon Wittber)
(http://archives.postgresql.org/pgsql-general/2004-12/msg00159.php)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-06-22 16:14:12 Re: GUC time unit spelling a bit inconsistent
Previous Message Tatsuo Ishii 2007-06-22 15:52:26 Re: tsearch in core patch