multibyte charater set in levenshtein function
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2010-05-10T15:35:02Z
Lists: pgsql-hackers
Attachments
- fuzzystrmatch.diff.gz (application/x-gzip) patch
Hackers,
The current version of levenshtein function in fuzzystrmatch contrib modulte
doesn't work properly with multibyte charater sets.
test=# select levenshtein('фыва','аыва');
levenshtein
-------------
2
(1 row)
My patch make this function works properly with multibyte charater sets.
test=# select levenshtein('фыва','аыва');
levenshtein
-------------
1
(1 row)
Also it avoids text_to_cstring call.
Regards,
Alexander Korotkov.