aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistproc.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-05-07 15:59:52 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-05-07 15:59:52 -0400
commit5db48808c4d5c3641b76d442ba7e7d8916adadf4 (patch)
tree5666bd33283fbde01ae27253260c24a4a7fd24be /src/backend/access/gist/gistproc.c
parent59273a7cec34e5bb8a9483f23a03e3318b52d65b (diff)
downloadpostgresql-5db48808c4d5c3641b76d442ba7e7d8916adadf4.tar.gz
postgresql-5db48808c4d5c3641b76d442ba7e7d8916adadf4.zip
Fix YA text phrase search bug.
checkcondition_str() failed to report multiple matches for a prefix pattern correctly: it would dutifully merge the match positions, but then after exiting that loop, if the last prefix-matching word had had no suitable positions, it would report there were no matches. The upshot would be failing to recognize a match that the query should match. It looks like you need all of these conditions to see the bug: * a phrase search (else we don't ask for match position details) * a prefix search item (else we don't get to this code) * a weight restriction (else checkclass_str won't fail) Noted while investigating a problem report from Pavel Borisov, though this is distinct from the issue he was on about. Back-patch to 9.6 where phrase search was added.
Diffstat (limited to 'src/backend/access/gist/gistproc.c')
0 files changed, 0 insertions, 0 deletions