- Notifications
You must be signed in to change notification settings - Fork28
Commit80dc07a
committed
Simplify loop logic in nodeIncrementalSort.c.
The inner loop in switchToPresortedPrefixMode() can be implementedas a conventional integer-counter for() loop, removing a couple ofredundant boolean state variables. The old logic here was a remnantof earlier development, but as things now stand there's no reasonfor extra complexity.Also, annotate the test case added by 82e0e2930 to explain why itmanages to hit the corner case fixed in that commit, and add anEXPLAIN to verify that it's creating an incremental-sort plan.Back-patch to v13, like the previous patch.James Coleman and Tom LaneDiscussion:https://postgr.es/m/16846-ae49f51ac379a4cb@postgresql.org1 parent18cacf8 commit80dc07a
File tree
3 files changed
+31
-35
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+31
-35
lines changedLines changed: 12 additions & 35 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
291 |
| - | |
292 |
| - | |
293 |
| - | |
| 291 | + | |
294 | 292 |
| |
295 | 293 |
| |
296 | 294 |
| |
| |||
343 | 341 |
| |
344 | 342 |
| |
345 | 343 |
| |
346 |
| - | |
| 344 | + | |
347 | 345 |
| |
348 |
| - | |
349 |
| - | |
350 | 346 |
| |
351 | 347 |
| |
352 | 348 |
| |
353 | 349 |
| |
354 | 350 |
| |
355 |
| - | |
| 351 | + | |
356 | 352 |
| |
357 | 353 |
| |
358 |
| - | |
359 |
| - | |
360 | 354 |
| |
361 | 355 |
| |
362 | 356 |
| |
| |||
376 | 370 |
| |
377 | 371 |
| |
378 | 372 |
| |
379 |
| - | |
380 | 373 |
| |
381 | 374 |
| |
382 | 375 |
| |
| |||
395 | 388 |
| |
396 | 389 |
| |
397 | 390 |
| |
398 |
| - | |
399 |
| - | |
400 |
| - | |
401 |
| - | |
402 |
| - | |
403 |
| - | |
| 391 | + | |
404 | 392 |
| |
405 | 393 |
| |
406 | 394 |
| |
407 |
| - | |
408 |
| - | |
409 |
| - | |
410 |
| - | |
411 |
| - | |
412 |
| - | |
413 |
| - | |
414 |
| - | |
415 |
| - | |
416 |
| - | |
417 |
| - | |
418 |
| - | |
419 | 395 |
| |
420 | 396 |
| |
421 | 397 |
| |
| |||
428 | 404 |
| |
429 | 405 |
| |
430 | 406 |
| |
431 |
| - | |
| 407 | + | |
432 | 408 |
| |
433 | 409 |
| |
434 |
| - | |
435 |
| - | |
436 |
| - | |
437 |
| - | |
438 |
| - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
439 | 416 |
| |
440 | 417 |
| |
441 | 418 |
| |
| |||
1104 | 1081 |
| |
1105 | 1082 |
| |
1106 | 1083 |
| |
1107 |
| - | |
| 1084 | + | |
1108 | 1085 |
| |
1109 | 1086 |
| |
1110 | 1087 |
| |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
676 | 676 |
| |
677 | 677 |
| |
678 | 678 |
| |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
679 | 694 |
| |
680 | 695 |
| |
681 | 696 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
153 | 157 |
| |
154 | 158 |
| |
155 | 159 |
| |
|
0 commit comments
Comments
(0)