summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2017-01-26 17:17:47 +0000
committerTom Lane2017-01-26 17:17:47 +0000
commitfe6120f9b359d3ac20f235fbf9938bcd850b1598 (patch)
tree57dba9f7ee31597e6f1b6d50f4b2ea5934b11c6c /doc/src
parent38bec18056b86f793afa642b2f991ea6ec1b8491 (diff)
Ensure that a tsquery like '!foo' matches empty tsvectors.
!foo means "the tsvector does not contain foo", and therefore it should match an empty tsvector. ts_match_vq() overenthusiastically supposed that an empty tsvector could never match any query, so it forcibly returned FALSE, the wrong answer. Remove the premature optimization. Our behavior on this point was inconsistent, because while seqscans and GIST index searches both failed to match empty tsvectors, GIN index searches would find them, since GIN scans don't rely on ts_match_vq(). That makes this certainly a bug, not a debatable definition disagreement, so back-patch to all supported branches. Report and diagnosis by Tom Dunstan (bug #14515); added test cases by me. Discussion: https://postgr.es/m/20170126025524.1434.97828@wrigleys.postgresql.org
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions