On Sunday 28 October 2007 01:28, Nikola Smolenski wrote:
Would it be possible to add some user defined
functions to MySQL servers?
I'm having in mind Levenshtein distance:
Given that there was no response to this, perhaps I should be a bit less
A user defined function (UDF) is a function added to MySQL by an external
library. It is used as any other MySQL function. You can read more at
. I can
(hopefully) compile the library, but root access is needed to add the
function to MySQL.
A function which I would like to have is Levenshtein distance. This function
can tell how similar two strings are, similar to SOUNDEX() function, but the
latter is limited to English language, and even in it it Levenshtein could
perform better. You can read more at
. I see two very
interesting applications for it: finding articles with similar titles, and
measuring amount of a contribution. The first is obviously useful to locate
missing redirects, duplicate articles and similar problems, and could later
even be included in MediaWiki to assist searching, and the second could be
used to highlight significant edits (edits which change a lot of text in an
article may still have make small difference in text size) albeit this
probably wouldn't be useful on the Toolserver.
To my knowledge, there should be no performance issues (MySQL shouldn't work
slower with UDFs installed), and I have not found about any security issues.
If someone thinks that another UDF might be useful, see a list of them at