On Mon, Dec 7, 2009 at 8:33 AM, marcin mank <marcin.m...@gmail.com> wrote: > The current behavior of levenshtein(text,text,int,int,int) is wrong. Consider: > > leki_dev=# select levenshtein('','a',2,4,5); > levenshtein > ------------- > 1 > (1 row) > > > leki_dev=# select levenshtein('a','',2,4,5); > levenshtein > ------------- > 1 > (1 row) > > > leki_dev=# select levenshtein('aa','a',2,4,5); > levenshtein > ------------- > 1 > (1 row) > > > leki_dev=# select levenshtein('a','aa',2,4,5); > levenshtein > ------------- > 1 > (1 row) > > versus (after patch) > > postgres=# select levenshtein('','a',2,4,5); > levenshtein > ------------- > 2 > (1 row) > > postgres=# select levenshtein('a','',2,4,5); > levenshtein > ------------- > 4 > (1 row) > > postgres=# select levenshtein('aa','a',2,4,5); > levenshtein > ------------- > 4 > (1 row) > > postgres=# select levenshtein('a','aa',2,4,5); > levenshtein > ------------- > 2 > (1 row) > > patch attached.
I cannot get this patch to apply for anything. All 4 hunks fail, both on HEAD and on the the pre-8.4-pgindent version of fuzzystrmatch.c. Either I'm doing something wrong here, or there's something wrong with this patch file. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers