> It's already multibyte safe since 8.4
No, it doesn't.
$ psql test
Pager usage is off.
psql (8.4.4)
Type "help" for help.
test=# select similarity('abc', 'abd'); -- OKsimilarity
------------ 0.333333
(1 row)
test=# select similarity('日本語', '日本後'); -- NGsimilarity
------------ NaN
(1 row)
test=# select show_trgm('abc'); -- OK show_trgm
-------------------------{" a"," ab",abc,"bc "}
(1 row)
test=# select show_trgm('日本語'); -- NGshow_trgm
-----------{}
(1 row)
Encoding is EUC_JP, locale is C. Included is the script to reproduce
the problem.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp