Re: changing text search treatment of puncutation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: changing text search treatment of puncutation
Дата
Msg-id 19089.1215045322@sss.pgh.pa.us
обсуждение исходный текст
Ответ на changing text search treatment of puncutation  (John DeSoi <desoi@pgedit.com>)
Ответы Re: changing text search treatment of puncutation  (Teodor Sigaev <teodor@sigaev.ru>)
Re: changing text search treatment of puncutation  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-general
John DeSoi <desoi@pgedit.com> writes:
> Is there an easy way to change '/' to be treated like '-' ? I've
> looked over the documentation several times and could not find
> anything. Even just a way to get the two tokens 'home' and 'work'
> without the joined form would be helpful.

Seems like the simplest solution is just to apply
    regexp_replace(text, '/', '-', 'g')
before letting the text search stuff have the string.  If you're
using a trigger to update a tsvector column, this would be pretty
trivial to do within the trigger.

In general there seem to be a lot of ways that people wish they
could tweak the text search parser, and telling them to write
their own parser isn't a very helpful response for most folk.
I don't have an idea about how to improve the situation, but
it seems like something that should be thought about.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Memory use in 8.3 plpgsql with heavy use of xpath()
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Delete from Join