[plainto_tsquery] using OR

Поиск
Список
Период
Сортировка
От Sven R. Kunze
Тема [plainto_tsquery] using OR
Дата
Msg-id 5565A5FF.5010701@tbz-pariv.de
обсуждение исходный текст
Список pgsql-general
Hi everybody,

I struggle to find a clean solution in an application to safely parse
the query input string of a user.

Currently, I am inclined to split the string with some magic regex and
build it safely together using ' | '. That solution, however, is
error-prone and hides the powerful features of tsquery that PostgreSQL
could provide from the user.

Is there a way to safely create a tsquery out of user's input?
Optionally, when the user types '&', '|', '!' '(' and ')' it could be
interpreted like typical tsquery syntax BUT still creates valid tsquery.

Regards,

--
Sven R. Kunze
TBZ-PARIV GmbH, Bernsdorfer Str. 210-212, 09126 Chemnitz
Tel: +49 (0)371 33714721, Fax: +49 (0)371 5347920
e-mail: srkunze@tbz-pariv.de
web: www.tbz-pariv.de

Geschäftsführer: Dr. Reiner Wohlgemuth
Sitz der Gesellschaft: Chemnitz
Registergericht: Chemnitz HRB 8543



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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"