forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite5be899
committed
Refactoring by Heikki Linnakangas <heikki@enterprisedb.com> with
small editorization by me- Brake the QueryItem struct into QueryOperator and QueryOperand. Type was really the only common field between them. QueryItem still exists, and is used in the TSQuery struct as before, but it's now a union of the two. Many other changes fell from that, like separation of pushval_asis function into pushValue, pushOperator and pushStop.- Moved some structs that were for internal use only from header files to the right .c-files.- Moved tsvector parser to a new tsvector_parser.c file. Parser code was about half of the size of tsvector.c, it's also used from tsquery.c, and it has some data structures of its own, so it seems better to separate it. Cleaned up the API so that TSVectorParserState is not accessed from outside tsvector_parser.c.- Separated enumerations (#defines, really) used for QueryItem.type field and as return codes from gettoken_query. It was just accidental code sharing.- Removed ParseQueryNode struct used internally by makepol and friends. push*-functions now construct QueryItems directly.- Changed int4 variables to just ints for variables like "i" or "array size", where the storage-size was not significant.1 parentda12484 commite5be899
File tree
18 files changed
+1278
-822
lines changed- src
- backend
- tsearch
- utils/adt
- include/tsearch
18 files changed
+1278
-822
lines changedLines changed: 19 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
228 |
| - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
229 | 236 |
| |
230 | 237 |
| |
231 |
| - | |
| 238 | + | |
232 | 239 |
| |
233 | 240 |
| |
234 | 241 |
| |
| |||
237 | 244 |
| |
238 | 245 |
| |
239 | 246 |
| |
| 247 | + | |
240 | 248 |
| |
241 | 249 |
| |
242 | 250 |
| |
243 | 251 |
| |
244 | 252 |
| |
245 | 253 |
| |
246 |
| - | |
| 254 | + | |
247 | 255 |
| |
248 | 256 |
| |
249 | 257 |
| |
| |||
260 | 268 |
| |
261 | 269 |
| |
262 | 270 |
| |
263 |
| - | |
| 271 | + | |
264 | 272 |
| |
265 | 273 |
| |
266 |
| - | |
| 274 | + | |
267 | 275 |
| |
268 | 276 |
| |
269 | 277 |
| |
270 | 278 |
| |
271 | 279 |
| |
272 |
| - | |
| 280 | + | |
273 | 281 |
| |
274 | 282 |
| |
275 | 283 |
| |
276 | 284 |
| |
277 |
| - | |
| 285 | + | |
278 | 286 |
| |
279 | 287 |
| |
280 | 288 |
| |
| |||
283 | 291 |
| |
284 | 292 |
| |
285 | 293 |
| |
286 |
| - | |
| 294 | + | |
287 | 295 |
| |
288 | 296 |
| |
289 | 297 |
| |
| |||
295 | 303 |
| |
296 | 304 |
| |
297 | 305 |
| |
298 |
| - | |
| 306 | + | |
299 | 307 |
| |
300 | 308 |
| |
301 | 309 |
| |
| |||
333 | 341 |
| |
334 | 342 |
| |
335 | 343 |
| |
336 |
| - | |
| 344 | + | |
337 | 345 |
| |
338 | 346 |
| |
339 | 347 |
| |
|
Lines changed: 12 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
344 | 344 |
| |
345 | 345 |
| |
346 | 346 |
| |
347 |
| - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
348 | 350 |
| |
349 | 351 |
| |
350 |
| - | |
| 352 | + | |
351 | 353 |
| |
352 | 354 |
| |
353 | 355 |
| |
| |||
427 | 429 |
| |
428 | 430 |
| |
429 | 431 |
| |
430 |
| - | |
| 432 | + | |
431 | 433 |
| |
432 | 434 |
| |
433 | 435 |
| |
| |||
458 | 460 |
| |
459 | 461 |
| |
460 | 462 |
| |
461 |
| - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
462 | 466 |
| |
463 | 467 |
| |
464 | 468 |
| |
465 | 469 |
| |
466 |
| - | |
| 470 | + | |
467 | 471 |
| |
468 | 472 |
| |
469 | 473 |
| |
470 | 474 |
| |
471 |
| - | |
| 475 | + | |
472 | 476 |
| |
473 | 477 |
| |
474 | 478 |
| |
| |||
511 | 515 |
| |
512 | 516 |
| |
513 | 517 |
| |
514 |
| - | |
| 518 | + | |
515 | 519 |
| |
516 | 520 |
| |
517 | 521 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
1575 | 1575 |
| |
1576 | 1576 |
| |
1577 | 1577 |
| |
1578 |
| - | |
| 1578 | + | |
1579 | 1579 |
| |
1580 | 1580 |
| |
1581 | 1581 |
| |
| |||
1601 | 1601 |
| |
1602 | 1602 |
| |
1603 | 1603 |
| |
1604 |
| - | |
| 1604 | + | |
1605 | 1605 |
| |
1606 | 1606 |
| |
1607 | 1607 |
| |
1608 | 1608 |
| |
1609 | 1609 |
| |
1610 | 1610 |
| |
1611 |
| - | |
| 1611 | + | |
1612 | 1612 |
| |
1613 | 1613 |
| |
1614 | 1614 |
| |
| |||
1624 | 1624 |
| |
1625 | 1625 |
| |
1626 | 1626 |
| |
1627 |
| - | |
| 1627 | + | |
1628 | 1628 |
| |
1629 | 1629 |
| |
1630 | 1630 |
| |
1631 | 1631 |
| |
1632 | 1632 |
| |
1633 | 1633 |
| |
1634 |
| - | |
| 1634 | + | |
1635 | 1635 |
| |
1636 | 1636 |
| |
1637 | 1637 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
| 4 | + | |
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
|
Lines changed: 11 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
80 |
| - | |
| 80 | + | |
81 | 81 |
| |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
86 |
| - | |
| 86 | + | |
87 | 87 |
| |
88 | 88 |
| |
| 89 | + | |
89 | 90 |
| |
90 |
| - | |
| 91 | + | |
91 | 92 |
| |
92 |
| - | |
93 |
| - | |
| 93 | + | |
| 94 | + | |
94 | 95 |
| |
95 | 96 |
| |
96 | 97 |
| |
97 |
| - | |
| 98 | + | |
98 | 99 |
| |
99 | 100 |
| |
100 | 101 |
| |
| |||
116 | 117 |
| |
117 | 118 |
| |
118 | 119 |
| |
119 |
| - | |
| 120 | + | |
120 | 121 |
| |
121 | 122 |
| |
122 | 123 |
| |
123 |
| - | |
| 124 | + | |
124 | 125 |
| |
125 | 126 |
| |
126 | 127 |
| |
| |||
142 | 143 |
| |
143 | 144 |
| |
144 | 145 |
| |
145 |
| - | |
| 146 | + | |
146 | 147 |
| |
147 | 148 |
| |
148 | 149 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
293 | 293 |
| |
294 | 294 |
| |
295 | 295 |
| |
296 |
| - | |
| 296 | + | |
297 | 297 |
| |
298 | 298 |
| |
299 | 299 |
| |
| |||
304 | 304 |
| |
305 | 305 |
| |
306 | 306 |
| |
307 |
| - | |
| 307 | + | |
308 | 308 |
| |
309 |
| - | |
| 309 | + | |
310 | 310 |
| |
311 | 311 |
| |
312 | 312 |
| |
| |||
316 | 316 |
| |
317 | 317 |
| |
318 | 318 |
| |
319 |
| - | |
| 319 | + | |
320 | 320 |
| |
321 |
| - | |
| 321 | + | |
322 | 322 |
| |
323 | 323 |
| |
324 | 324 |
| |
|
0 commit comments
Comments
(0)