Bug in metaphone (contrib/fuzzystrmatch) - Mailing list pgsql-general

From Jim C. Nasby
Subject Bug in metaphone (contrib/fuzzystrmatch)
Date
Msg-id 20030605164334.GF40542@flake.decibel.org
Whole thread Raw
Responses Re: Bug in metaphone (contrib/fuzzystrmatch)  (Joe Conway <mail@joeconway.com>)
List pgsql-general
Second argument to metaphone is suposed to set the limit on the number
of characters to return, but it breaks on some phrases:

usps=# select metaphone(a,3),metaphone(a,4),metaphone(a,20) from (select 'Hello world'::varchar AS a) a;
 HLW       | HLWR      | HLWRLT

usps=# select metaphone(a,3),metaphone(a,4),metaphone(a,20) from (select 'A A COMEAUX MEMORIAL'::varchar AS a) a;
 AKM       | AKMKS     | AKMKSMMRL

In every case I've found that does this, the 4th and 5th letters are
always 'KS'.
--
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

pgsql-general by date:

Previous
From: Avi Schwartz
Date:
Subject: Re: Nulls get converted to 0 problem
Next
From: "Nick Barr"
Date:
Subject: Create index on the year of a date column