Re: new function for tsquery creartion
От | Dmitry Ivanov |
---|---|
Тема | Re: new function for tsquery creartion |
Дата | |
Msg-id | cbd6ea6e79b8247765a6c493943a5799@postgrespro.ru обсуждение исходный текст |
Ответ на | Re: new function for tsquery creartion (Aleksandr Parfenov <a.parfenov@postgrespro.ru>) |
Ответы |
Re: new function for tsquery creartion
|
Список | pgsql-hackers |
Hi Aleksandr, > I agree with Aleksander about silencing all errors in > websearch_to_tsquery(). > > In the attachment is a revised patch with the attempt to introduce an > ability to ignore syntax errors in gettoken_tsvector(). Thanks for the further improvements! Yes, you're both right, the API has to be consistent. Unfortunately, I had to make some adjustments according to Oleg Bartunov's review. Here's a change log: 1. &, | and (), <-> are no longer considered operators in web search mode. 2. I've stumbled upon a bug: web search used to transform "pg_class" into 'pg <-> class', which is no longer the case. 3. I changed the behavior of gettoken_tsvector() as soon as I had heard from Aleksander Alekseev, so I decided to use my implementation in this revision of the patch. This is a good subject for discussion, though. Feel free to share your opinion. 4. As suggested by Theodor, I've replaced some bool args with bit flags. > The name of enum ts_parsestate looks more like a name of the function > than a name of a type. > In my version, it renamed to QueryParserState, but you can fix it if > I'm wrong. True, but gettoken_query() returns ts_tokentype, so I decided to use this naming scheme. -- Dmitry Ivanov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
Вложения
В списке pgsql-hackers по дате отправления: