| От | Tom Lane |
|---|---|
| Тема | Re: tsearch2: how to plainto_tsquery() with "|" |
| Дата | |
| Msg-id | 30669.1395780394@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | tsearch2: how to plainto_tsquery() with "|" (John Smith <jayzee.smith@gmail.com>) |
| Ответы |
Re: tsearch2: how to plainto_tsquery() with "|"
|
| Список | pgsql-general |
John Smith <jayzee.smith@gmail.com> writes:
> i can run "...@@ to_tsquery('cat | dog')".
> but if i run "...@@ to_tsquery('cat dog')", it gives me a syntax error (#42601).
> so i run "...@@ plainto_tsquery('cat dog')".
> but then i can't run "...@@ plainto_tsquery('cat | dog')".
Yeah ... that's pretty much exactly the point of having two different
functions. to_tsquery() honors boolean operators in the query, the other
doesn't.
If this doesn't fit your notions of a reasonable API, maybe you could
create your own preprocessing function.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера