From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fwd: Re: [DOCS] Document Upper Limit for NAMEDATELEN in pgsql 9.5+ |
Date: | 2016-01-22 16:54:00 |
Message-ID: | 24909.1453481640@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Actually, though, varstr_levenshtein_less_equal() never gets called
> from parse_relation.c with a distance bound of more than four, so it
> can't actually go quadratic. There's another call in that file to
> varstr_levenshtein(), which in retrospect looks silly, but I'm pretty
> sure that could also be changed to use a distance bound of 4 (well,
> MAX_FUZZY_DISTNACE + 1) without changing the behavior at all. Given a
> constant distance bound, the algorithm is, I believe, only O(max(m,
> n)) not O(mn). Knowing that, we could let the internal code just
> bypass the length check and only enforce the length restriction when
> the code is called from SQL via fuzzystrmatch.
Done that way; thanks for the advice.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2016-01-22 18:14:43 | Re: Releasing in September |
Previous Message | Andres Freund | 2016-01-22 16:51:53 | Re: WIP: Failover Slots |