Re: tsearch2 error msg

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: tsearch2 error msg
Дата
Msg-id 452297F2.8050401@sigaev.ru
обсуждение исходный текст
Ответ на Re: tsearch2 error msg  (AgentM <agentm@themactionfaction.com>)
Список pgsql-hackers
> This is great news- previously, I was using various regexes to sanitize 
> input into user-accessible search fields. Would it be build in some 
> simple query language?
> 
> "sam AND spade"
> "blue OR yellow"
> "(same AND spade) OR (blue AND yellow)"

That's exactly to_tsquery syntax, just change AND to & and OR to |. :)
So, if you can validate AND/OR then you can validate &/| syntax or validate 
AND/OR and change they to tsquery's equivalents.



-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: PG qsort vs. Solaris
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: src/tools/msvc usage instructions