Re: contrib/levenshtein() has a bug?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ben <bench(at)silentmedia(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: contrib/levenshtein() has a bug?
Date: 2006-09-28 19:37:07
Message-ID: 20060928193707.GB16473@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

On Thu, Sep 28, 2006 at 12:02:34PM -0700, Ben wrote:
> The levenshtein function from contrib/fuzzystrmatch.sql has a max arg
> length of 255. OK, that's cool. But check this out:
>
<snip>
> mbrainz_db=> select levenshtein(name,'foo') from public.track;
> ERROR: argument exceeds max length: 255

The message is slightly wrong, the max length is actually one more. You
can adjust the maximum length by changing the params in
fuzzystrmatch.h and recompiling.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-09-28 21:19:26 Re: contrib/levenshtein() has a bug?
Previous Message Ben 2006-09-28 19:02:34 contrib/levenshtein() has a bug?

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-09-28 21:11:43 Re: [HACKERS] Numeric overflow problem + patch
Previous Message Ben 2006-09-28 19:02:34 contrib/levenshtein() has a bug?