Re: add soundex difference function to contrib/fuzzystrmatch

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: add soundex difference function to contrib/fuzzystrmatch
Дата
Msg-id Pine.BSO.4.56.0501250214120.29396@leary.csoft.net
обсуждение исходный текст
Ответ на Re: add soundex difference function to  (Neil Conway <neilc@samurai.com>)
Ответы Re: add soundex difference function to  (Neil Conway <neilc@samurai.com>)
Re: add soundex difference function to contrib/fuzzystrmatch  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches

On Tue, 25 Jan 2005, Neil Conway wrote:

> On Tue, 2005-01-25 at 01:13 -0500, Kris Jurka wrote:
> > The attached patch implements the soundex difference function which
> > compares two strings' soundex values for similarity.
>
> *** 19,24 ****
> --- 19,28 ----
>   AS 'MODULE_PATHNAME', 'soundex'
>   LANGUAGE 'C';
>
> + CREATE FUNCTION difference(text,text) RETURNS int
> + AS 'MODULE_PATHNAME', 'difference'
> + LANGUAGE 'C';
> +
>
> This should be immutable, right?
>

Yes, it should, and even more importantly strict because it crashes when
called with null inputs.  I copied this off the adjacent entry without
thinking about it.  So currently SELECT text_soundex(NULL); crashes the
server.  I've attached two new patches.  One revising my original patch to
make the function creations consistent and the other to just fix the
problem in the existing code (which should be backported as far as people
would like to).

Kris Jurka

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: add soundex difference function to
Следующее
От: Neil Conway
Дата:
Сообщение: Re: add soundex difference function to