contrib/levenshtein() has a bug? - Mailing list pgsql-general

From Ben
Subject contrib/levenshtein() has a bug?
Date
Msg-id Pine.LNX.4.64.0609281157250.21293@GRD.cube42.tai.silentmedia.com
Whole thread Raw
Responses Re: contrib/levenshtein() has a bug?  (Martijn van Oosterhout <kleptog@svana.org>)
Re: contrib/levenshtein() has a bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
The levenshtein function from contrib/fuzzystrmatch.sql has a max arg
length of 255. OK, that's cool. But check this out:

mbrainz_db=> select max(length(name)) from public.track;
  max
-----
  255
(1 row)

mbrainz_db=> select levenshtein(name,'foo') from public.track;
ERROR:  argument exceeds max length: 255


That seems odd. What's odder is:

mbrainz_db=> select levenshtein(substring(name for 100),'foo') from public.track;
ERROR:  argument exceeds max length: 255



Any suggestions? I'm using the Fedora 5 rpms, so it looks like that puts
me at 8.1.4.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Strange query results with invalid multibyte
Next
From: Martijn van Oosterhout
Date:
Subject: Re: contrib/levenshtein() has a bug?