ts_count

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема ts_count
Дата
Msg-id 4DEA2946.3040109@dunslane.net
обсуждение исходный текст
Ответы Re: ts_count  (Oleg Bartunov <oleg@sai.msu.su>)
Re: ts_count  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
One of our PostgreSQL Experts Inc customers wanted a function to count 
all the occurrences of terms in a tsquery in a tsvector. This has been 
written as a loadable module function, and initial testing shows it is 
working well. With the client's permission we are releasing the code - 
it's available at <https://github.com/pgexperts/ts_count>. The actual 
new code involved here is tiny, some of the code is C&P'd from tsrank.c 
and much of the rest is boilerplate.

A snippet from the regression test:

   select ts_count(to_tsvector('managing managers manage peons   managerially'),
to_tsquery('managers| peon'));     ts_count   ----------            4
 

We'd like to add something like this for 9.2, so I'd like to get the API agreed and then I'll prepare a patch and
submitit for the next CF.
 

Comments? cheers andrew



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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Error in PQsetvalue
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: creating CHECK constraints as NOT VALID