Re: pg_trgm

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: teodor(at)sigaev(dot)ru
Cc: ishii(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_trgm
Date: 2010-05-27 11:53:37
Message-ID: 20100527.205337.133434990.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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'); -- OK
similarity
------------
0.333333
(1 row)

test=# select similarity('日本語', '日本後'); -- NG
similarity
------------
NaN
(1 row)

test=# select show_trgm('abc'); -- OK
show_trgm
-------------------------
{" a"," ab",abc,"bc "}
(1 row)

test=# select show_trgm('日本語'); -- NG
show_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

Attachment Content-Type Size
pg_trgm.sql application/octet-stream 149 bytes

In response to

  • Re: pg_trgm at 2010-05-27 10:54:31 from Teodor Sigaev

Responses

  • Re: pg_trgm at 2010-05-27 12:18:17 from Andres Freund

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-05-27 12:02:56 Re: Synchronization levels in SR
Previous Message Simon Riggs 2010-05-27 11:30:30 Re: Synchronization levels in SR