Re: Query on a record variable

Поиск
Список
Период
Сортировка
От Giuseppe Broccolo
Тема Re: Query on a record variable
Дата
Msg-id 5211F10D.7050701@2ndquadrant.it
обсуждение исходный текст
Ответ на Query on a record variable  ("Janek Sendrowski" <janek12@web.de>)
Список pgsql-general
Hi Janek,

> Hi,
>
> ok :)

I suppose you have a table 'table' with 'col' (text), 'dede' (text) and
'vectors' (tsvector) as fields. In this case, you can do

SELECT levenshtein(col, 'string') FROM table AS lev WHERE
levenshtein(col, 'string') < 10 AND LENGTH(dede) BETWEEN x AND y AND
plainto_tsquery('string') @@ vectors;

Hope it can help.

Giuseppe.

--
Giuseppe Broccolo - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
giuseppe.broccolo@2ndQuadrant.it | www.2ndQuadrant.it



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

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: Re: Denormalized field
Следующее
От: Robert Sosinski
Дата:
Сообщение: Re: Memory Issue with array_agg?