BUG #17125: Operator precedence bug in websearch_to_tsquery function

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: tim(dot)connolly(at)oovvuu(dot)com
Subject: BUG #17125: Operator precedence bug in websearch_to_tsquery function
Date: 2021-07-28 01:39:46
Message-ID: 17125-483838072f5f4bac@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17125
Logged by: Tim Connolly
Email address: tim(dot)connolly(at)oovvuu(dot)com
PostgreSQL version: 11.12
Operating system: Alpine Linux
Description:

Expectation: A web-search query of 'foo bar or baz' should match documents
that contain 'foo' and 'bar', and documents that contain 'foo' and 'baz'.

postgres=# select to_tsvector('english', 'baz') @@
websearch_to_tsquery('english', 'foo bar or baz ');
?column?
----------
t
(1 row)

Expected: f

postgres=# select websearch_to_tsquery('english', 'foo bar or baz');
websearch_to_tsquery
-----------------------
'foo' & 'bar' | 'baz'
(1 row)

Expected: 'foo' & ('bar' | 'baz')

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Orishich Aleksey 2021-07-28 02:17:42 RE: Postgresql12: ERROR: Could not read from file "pg_act/02 F 4" at offset 253952: read too few bytes
Previous Message Alexander Korotkov 2021-07-27 21:12:30 Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange