forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit92fe689
committed
Fix assorted bugs by changing TS_execute's callback API to ternary logic.
Text search sometimes failed to find valid matches, for instance'!crew:A'::tsquery might fail to locate 'crew:1B'::tsvector duringan index search. The root of the issue is that TS_execute's callbackfunctions were not changed to use ternary (yes/no/maybe) reportingwhen we made the search logic itself do so. It's somewhat annoyingto break that API, but on the other hand we now see that any codeusing plain boolean logic is almost certainly broken since theaddition of phrase search. There seem to be very few outside callersof this code anyway, so we'll just break them intentionally to getthem to adapt.This allows removal of tsginidx.c's private re-implementation ofTS_execute, since that's now entirely duplicative. It's also nolonger necessary to avoid use of CALC_NOT in tsgistidx.c, sincethe underlying callbacks can now do something reasonable.Back-patch into v13. We can't change this in stable branches,but it seems not quite too late to fix it in v13.Tom Lane and Pavel BorisovDiscussion:https://postgr.es/m/CALT9ZEE-aLotzBg-pOp2GFTesGWVYzXA3=mZKzRDa_OKnLF7Mg@mail.gmail.com1 parent7dab456 commit92fe689
File tree
10 files changed
+395
-189
lines changed- src
- backend
- tsearch
- utils/adt
- include/tsearch
- test/regress
- expected
- sql
10 files changed
+395
-189
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1969 | 1969 |
| |
1970 | 1970 |
| |
1971 | 1971 |
| |
1972 |
| - | |
| 1972 | + | |
1973 | 1973 |
| |
1974 | 1974 |
| |
1975 | 1975 |
| |
| |||
1982 | 1982 |
| |
1983 | 1983 |
| |
1984 | 1984 |
| |
1985 |
| - | |
| 1985 | + | |
1986 | 1986 |
| |
1987 | 1987 |
| |
1988 | 1988 |
| |
| |||
1999 | 1999 |
| |
2000 | 2000 |
| |
2001 | 2001 |
| |
2002 |
| - | |
| 2002 | + | |
2003 | 2003 |
| |
2004 |
| - | |
| 2004 | + | |
2005 | 2005 |
| |
2006 | 2006 |
| |
2007 | 2007 |
| |
|
Lines changed: 24 additions & 109 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
181 |
| - | |
182 |
| - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
183 | 186 |
| |
| 187 | + | |
184 | 188 |
| |
185 | 189 |
| |
186 | 190 |
| |
| |||
193 | 197 |
| |
194 | 198 |
| |
195 | 199 |
| |
196 |
| - | |
197 |
| - | |
198 |
| - | |
199 |
| - | |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
236 | 205 |
| |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
270 |
| - | |
271 |
| - | |
272 |
| - | |
273 |
| - | |
274 |
| - | |
275 |
| - | |
276 |
| - | |
277 |
| - | |
278 |
| - | |
279 |
| - | |
280 |
| - | |
281 |
| - | |
282 |
| - | |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 |
| - | |
295 |
| - | |
296 |
| - | |
297 |
| - | |
| 206 | + | |
| 207 | + | |
298 | 208 |
| |
299 | 209 |
| |
300 |
| - | |
301 |
| - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
302 | 216 |
| |
303 | 217 |
| |
304 | 218 |
| |
| |||
370 | 284 |
| |
371 | 285 |
| |
372 | 286 |
| |
373 |
| - | |
374 |
| - | |
375 |
| - | |
376 |
| - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
377 | 292 |
| |
378 | 293 |
| |
379 | 294 |
| |
|
Lines changed: 16 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
273 | 273 |
| |
274 | 274 |
| |
275 | 275 |
| |
276 |
| - | |
| 276 | + | |
277 | 277 |
| |
278 |
| - | |
| 278 | + | |
279 | 279 |
| |
280 | 280 |
| |
281 | 281 |
| |
| |||
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
291 |
| - | |
| 291 | + | |
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
295 | 295 |
| |
296 | 296 |
| |
297 |
| - | |
| 297 | + | |
298 | 298 |
| |
299 | 299 |
| |
300 | 300 |
| |
301 | 301 |
| |
302 | 302 |
| |
303 | 303 |
| |
304 |
| - | |
| 304 | + | |
305 | 305 |
| |
306 | 306 |
| |
307 |
| - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
308 | 311 |
| |
309 | 312 |
| |
310 | 313 |
| |
| |||
313 | 316 |
| |
314 | 317 |
| |
315 | 318 |
| |
316 |
| - | |
317 |
| - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
318 | 325 |
| |
319 | 326 |
| |
320 | 327 |
| |
| |||
339 | 346 |
| |
340 | 347 |
| |
341 | 348 |
| |
342 |
| - | |
343 | 349 |
| |
344 | 350 |
| |
345 |
| - | |
| 351 | + | |
346 | 352 |
| |
347 | 353 |
| |
348 | 354 |
| |
|
Lines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
556 | 556 |
| |
557 | 557 |
| |
558 | 558 |
| |
559 |
| - | |
560 |
| - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
561 | 565 |
| |
562 | 566 |
| |
563 | 567 |
| |
564 | 568 |
| |
565 | 569 |
| |
566 |
| - | |
| 570 | + | |
567 | 571 |
| |
568 | 572 |
| |
569 | 573 |
| |
| |||
573 | 577 |
| |
574 | 578 |
| |
575 | 579 |
| |
576 |
| - | |
| 580 | + | |
577 | 581 |
| |
578 | 582 |
| |
579 | 583 |
| |
|
0 commit comments
Comments
(0)