Bug in metaphone (contrib/fuzzystrmatch)

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: pgsql-general(at)postgresql(dot)org, joseph(dot)conway(at)home(dot)com
Subject: Bug in metaphone (contrib/fuzzystrmatch)
Date: 2003-06-05 16:43:34
Message-ID: 20030605164334.GF40542@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

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(at)nasby(dot)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?"

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Avi Schwartz 2003-06-05 16:44:34 Re: Nulls get converted to 0 problem
Previous Message Nick Barr 2003-06-05 16:38:21 Create index on the year of a date column

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2003-06-05 18:59:41 Re: Detecting proper bison version before make
Previous Message Rod Taylor 2003-06-05 09:33:57 Re: pgstattuple for schemas