From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
---|---|
To: | peter_e(at)gmx(dot)net |
Cc: | ishii(at)postgresql(dot)org, ishii(at)sraoss(dot)co(dot)jp, tgl(at)sss(dot)pgh(dot)pa(dot)us, andres(at)anarazel(dot)de, pgsql-hackers(at)postgresql(dot)org, teodor(at)sigaev(dot)ru |
Subject: | Re: pg_trgm |
Date: | 2010-05-27 23:54:39 |
Message-ID: | 20100528.085439.93468861.t-ishii@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> I think the problem at hand has nothing at all to do with agglutination
> or CJK-specific issues. You will get the same problem with other
> languages *if* you set a locale that does not adequately support the
> characters in use. E.g., Russian with locale C and encoding UTF8:
>
> select similarity(E'\u0441\u043B\u043E\u043D', E'\u0441\u043B\u043E
> \u043D\u044B');
> similarity
> ────────────
> NaN
> (1 row)
Of course. That's why I started this thread.
With my patch:
test=# select similarity(E'\u0441\u043B\u043E\u043D', E'\u0441\u043B\u043E\u043D\u044B');
similarity
------------
0.75
(1 row)
Or you could just #undef KEEPONLYALNUM in trgm.h. But I'm not sure
this is the right thing for you.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2010-05-27 23:54:59 | Re: pg_trgm |
Previous Message | David Fetter | 2010-05-27 23:49:03 | VPATH docs |