Re: tsearch in core patch - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: tsearch in core patch
Date
Msg-id 20070622155242.GL8949@alvh.no-ip.org
Whole thread Raw
In response to Re: tsearch in core patch  (teodor@sigaev.ru)
Responses Re: tsearch in core patch  (teodor@sigaev.ru)
List pgsql-hackers
teodor@sigaev.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)


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: tsearch in core patch
Next
From: Tatsuo Ishii
Date:
Subject: Re: tsearch in core patch