Re: pg_trgm - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: pg_trgm
Date
Msg-id 20100527.205337.133434990.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: pg_trgm  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: pg_trgm
List pgsql-hackers
> 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

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Synchronization levels in SR
Next
From: Fujii Masao
Date:
Subject: Re: Synchronization levels in SR