forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5bda6fc
Don't overwrite scan key in systable_beginscan()
When systable_beginscan() and systable_beginscan_ordered() choose anindex scan, they remap the attribute numbers in the passed-in scankeys to the attribute numbers of the index, and then write thoseremapped attribute numbers back into the scan key passed by thecaller. This second part is surprising and gratuitous. It means thata scan key cannot safely be used more than once (but it mightsometimes work, depending on circumstances). Also, there is no valuein providing these remapped attribute numbers back to the caller,since they can't do anything with that.Fix that by making a copy of the scan keys passed by the caller andmake the modifications there.Also, some code that had to work around the previous situation issimplified.Discussion:https://www.postgresql.org/message-id/flat/f8c739d9-f48d-4187-b214-df3391ba41ab@eisentraut.org1 parent610589e commit5bda6fc
File tree
3 files changed
+40
-33
lines changed- src/backend
- access/index
- utils/cache
3 files changed
+40
-33
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
372 | 372 |
| |
373 | 373 |
| |
374 | 374 |
| |
375 |
| - | |
| 375 | + | |
376 | 376 |
| |
377 | 377 |
| |
378 | 378 |
| |
| |||
420 | 420 |
| |
421 | 421 |
| |
422 | 422 |
| |
| 423 | + | |
423 | 424 |
| |
424 |
| - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
425 | 428 |
| |
426 | 429 |
| |
427 | 430 |
| |
428 | 431 |
| |
| 432 | + | |
| 433 | + | |
429 | 434 |
| |
430 | 435 |
| |
431 | 436 |
| |
432 | 437 |
| |
433 |
| - | |
| 438 | + | |
434 | 439 |
| |
435 | 440 |
| |
436 | 441 |
| |
| |||
440 | 445 |
| |
441 | 446 |
| |
442 | 447 |
| |
443 |
| - | |
| 448 | + | |
444 | 449 |
| |
445 | 450 |
| |
446 | 451 |
| |
| |||
648 | 653 |
| |
649 | 654 |
| |
650 | 655 |
| |
| 656 | + | |
651 | 657 |
| |
652 | 658 |
| |
653 | 659 |
| |
| |||
679 | 685 |
| |
680 | 686 |
| |
681 | 687 |
| |
682 |
| - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
683 | 691 |
| |
684 | 692 |
| |
685 | 693 |
| |
686 | 694 |
| |
| 695 | + | |
| 696 | + | |
687 | 697 |
| |
688 | 698 |
| |
689 | 699 |
| |
690 | 700 |
| |
691 |
| - | |
| 701 | + | |
692 | 702 |
| |
693 | 703 |
| |
694 | 704 |
| |
| |||
698 | 708 |
| |
699 | 709 |
| |
700 | 710 |
| |
701 |
| - | |
| 711 | + | |
702 | 712 |
| |
703 | 713 |
| |
704 | 714 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1468 | 1468 |
| |
1469 | 1469 |
| |
1470 | 1470 |
| |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
1471 | 1481 |
| |
1472 | 1482 |
| |
1473 |
| - | |
1474 |
| - | |
1475 |
| - | |
1476 |
| - | |
1477 |
| - | |
1478 |
| - | |
1479 |
| - | |
1480 |
| - | |
1481 |
| - | |
1482 |
| - | |
1483 |
| - | |
1484 | 1483 |
| |
1485 | 1484 |
| |
1486 | 1485 |
| |
| |||
1788 | 1787 |
| |
1789 | 1788 |
| |
1790 | 1789 |
| |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
1791 | 1800 |
| |
1792 | 1801 |
| |
1793 |
| - | |
1794 |
| - | |
1795 |
| - | |
1796 |
| - | |
1797 |
| - | |
1798 |
| - | |
1799 |
| - | |
1800 |
| - | |
1801 |
| - | |
1802 |
| - | |
1803 |
| - | |
1804 | 1802 |
| |
1805 | 1803 |
| |
1806 | 1804 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
144 |
| - | |
145 | 144 |
| |
146 | 145 |
| |
147 | 146 |
| |
| |||
181 | 180 |
| |
182 | 181 |
| |
183 | 182 |
| |
| 183 | + | |
| 184 | + | |
184 | 185 |
| |
185 | 186 |
| |
186 | 187 |
| |
| |||
189 | 190 |
| |
190 | 191 |
| |
191 | 192 |
| |
192 |
| - | |
| 193 | + | |
193 | 194 |
| |
194 |
| - | |
195 |
| - | |
196 | 195 |
| |
197 | 196 |
| |
198 | 197 |
| |
|
0 commit comments
Comments
(0)