Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jan Przemysław Wójcik <jan(dot)przemyslaw(dot)wojcik(at)gmail(dot)com>
Cc: Postgres-Bugs <pgsql-bugs(at)postgresql(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug
Date: 2017-12-07 17:59:06
Message-ID: CA+Tgmobksqi+Kh2=NZarEhnSUAudY=3oc+K8HjqSRvytbw7cnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Tue, Nov 7, 2017 at 7:51 AM, Jan Przemysław Wójcik
<jan(dot)przemyslaw(dot)wojcik(at)gmail(dot)com> wrote:
> I'm afraid that creating a function that implements quite different
> algorithms depending on a global parameter seems very hacky and would lead
> to misunderstandings. I do understand the need of backward compatibility,
> but I'd opt for the lesser evil. Perhaps a good idea would be to change the
> name to 'substring_similarity()' and introduce the new function
> 'word_similarity()' later, for example in the next major version release.

That breaks things for everybody using word_similarity() currently.
If the previous discussion of this topic concluded that
word_similarity() was an OK name despite being a slight misnomer, I
don't think we should change our mind now. Instead the new function
can be called something which makes the difference clear, e.g.
strict_word_similarity(), and the old function can remain as it is.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jan Schulz 2017-12-07 18:00:54 Re: BUG #14948: cost overflow
Previous Message François CHAHUNEAU 2017-12-07 17:39:05 Re: [BUGS] pg_trgm word_similarity inconsistencies or bug

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-12-07 18:22:23 Re: Speeding up pg_upgrade
Previous Message Robert Haas 2017-12-07 17:52:19 Re: Postgres with pthread