Re: [pg_trgm] Making similarity(?, ?) < ? use an index

Поиск
Список
Период
Сортировка
От Artur Zakirov
Тема Re: [pg_trgm] Making similarity(?, ?) < ? use an index
Дата
Msg-id 4650cc9c-d146-14ca-6718-7b32aa06765b@postgrespro.ru
обсуждение исходный текст
Ответ на Re: [pg_trgm] Making similarity(?, ?) < ? use an index  (Greg Navis <contact@gregnavis.com>)
Ответы Re: [pg_trgm] Making similarity(?, ?) < ? use an index  (Greg Navis <contact@gregnavis.com>)
Список pgsql-general
On 08.06.2016 12:16, Greg Navis wrote:
> Would this be a better plan then:
>
> 1. Add support for trigram operators.
> 2. Implement `issimilar(lhs, rhs, threshold)`.
> 3. Add `issimilar` to the trigram operator classes.

I think Tom's proposal with composite type is exelent option. If I
understand correctly it introduce a new function similarity_rhs(). You
can use it as the following:

SELECT * FROM restaurants WHERE city % similarity_rhs('warsw', 0.4);
SELECT * FROM cinemas WHERE name % similarity_rhs('warsw', 0.2);

This is what you need?

If I understand correctly your plan differs from Tom's proposal. And I
am afraid that you will do a waste work.

--
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


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

Предыдущее
От: Greg Navis
Дата:
Сообщение: Re: [pg_trgm] Making similarity(?, ?) < ? use an index
Следующее
От: Николай Бабаджанян
Дата:
Сообщение: [C-function] Can SET_VARSIZE cause a memory leak?