BUG #18479: websearch_to_tsquery inconsistent behavior for german when using parentheses
От | PG Bug reporting form |
---|---|
Тема | BUG #18479: websearch_to_tsquery inconsistent behavior for german when using parentheses |
Дата | |
Msg-id | 18479-d9b46e2fc242c33e@postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #18479: websearch_to_tsquery inconsistent behavior for german when using parentheses
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 18479 Logged by: Manos Emmanouilidis Email address: esemmano@gmail.com PostgreSQL version: 15.4 Operating system: macOS Sonoma 14.4.1 x86 Description: Although the docs https://www.postgresql.org/docs/current/textsearch-controls.html say nothing about websearch_to_tsquery supporting parentheses in queries, I noticed some inconsistent behaviour when using multiple 'or' keywords with parentheses in postgres 15.4 In the following tests 1-3 the behaviour matches what I expect, but in the 4th test the 'or' keyword is used verbatim when parentheses are present in the middle of the query. select websearch_to_tsquery('german', 'foo or baz bar'); websearch_to_tsquery ----------------------- 'foo' | 'baz' & 'bar' select websearch_to_tsquery('german', 'foo or baz bar or ding dong'); websearch_to_tsquery ----------------------------------------- 'foo' | 'baz' & 'bar' | 'ding' & 'dong' select websearch_to_tsquery('german', 'foo or baz bar or (ding dong)'); websearch_to_tsquery ----------------------------------------- 'foo' | 'baz' & 'bar' | 'ding' & 'dong' select websearch_to_tsquery('german', 'foo or (baz bar) or (ding dong)'); websearch_to_tsquery ------------------------------------------------ 'foo' | 'baz' & 'bar' & 'or' & 'ding' & 'dong' I do not mean to say that this is necessarily a bug that needs fixing, but maybe either the docs should call out that using parens leads to undefined behaviour, or the function's logic could be updated to be consistent in the presence of parens - either ignore them completely or always consider them, but not both depending on the input
В списке pgsql-bugs по дате отправления: