model-writtenrun 8585 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Charles Offenbacher reported that a negated phrase query returned incorrect results with a GIN bitmap scan, while disabling bitmap scans or moving NOT outside the tsquery produced correct results #1.
- Tom Lane diagnosed that an uncertain phrase match was represented as true and then incorrectly negated to false, and proposed explicit three-valued logic to preserve uncertainty #2.
- Tom Lane submitted a patch implementing ternary evaluation internally while preserving the public boolean TS_execute API, together with a separate correction to GIN's existing ternary evaluator #3.
- The patch added lexeme positions to regression data and exercised phrase queries across scan methods; Tom also added behavior-preservation tests and invited Charles to test the fix, but the thread contains no subsequent review or testing response #3.
- The submitted patch landed unchanged as e81e5741a6 on April 27, 2020, with backpatching through PostgreSQL 9.6, completing the fix proposed in #3.