Re: tsvector extraction patch

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: tsvector extraction patch
Дата
Msg-id 200907061043.43684.peter_e@gmx.net
обсуждение исходный текст
Ответ на tsvector extraction patch  (Hans-Juergen Schoenig -- PostgreSQL <postgres@cybertec.at>)
Список pgsql-hackers
On Friday 03 July 2009 10:49:41 Hans-Juergen Schoenig -- PostgreSQL wrote:
> hello,
>
> this patch has not made it through yesterday, so i am trying to send it
> again.
> i made a small patch which i found useful for my personal tasks.
> it would be nice to see this in 8.5. if not core then maybe contrib.
> it transforms a tsvector to table format which is really nice for text
> processing and comparison.
>
> test=# SELECT * FROM tsvcontent(to_tsvector('english', 'i am pretty sure
> this is a good patch'));
>  lex   | rank
> --------+------
> good   |    8
> patch  |    9
> pretti |    3
> sure   |    4
> (4 rows)

Sounds useful.  But in the interest of orthogonality (or whatever), how about 
instead you write a cast from tsvector to text[], and then you can use 
unnest() to convert that to a table, e.g.,

SELECT * FROM unnest(CAST(to_tsvector('...') AS text[]));



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: First CommitFest: July 15th
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Feedback on writing extensible modules