forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitafa0ec3
committed
Refactor addition of PlaceHolderVars to joinrel targetlists.
Make build_joinrel_tlist() responsible for adding PHVs that werealready computed in one or the other input relation, and thereforechange add_placeholders_to_joinrel() to only add PHVs that will benewly computed in this joinrel's output. This makes the handlingof PHVs in build_joinrel_tlist() more like its handling of plainVars, which seems like a good thing on intelligibility groundsand will simplify planned future changes. There is a purelycosmetic side-effect that the order of entries in the joinrel'stlist may change; but since it becomes more like the order ofentries in the input tlists, that's not bad.The reason it wasn't done like this originally was the potentialcost of looking up PlaceHolderInfo entries to consult ph_needed.Now that that's O(1) it shouldn't hurt.Discussion:https://postgr.es/m/1405792.1660677844@sss.pgh.pa.us1 parentb3ff6c7 commitafa0ec3
File tree
3 files changed
+36
-19
lines changed- src
- backend/optimizer/util
- test/regress/expected
3 files changed
+36
-19
lines changedLines changed: 15 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
427 | 427 |
| |
428 | 428 |
| |
429 | 429 |
| |
430 |
| - | |
431 |
| - | |
432 |
| - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
433 | 433 |
| |
434 | 434 |
| |
435 | 435 |
| |
436 |
| - | |
437 |
| - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
438 | 440 |
| |
439 | 441 |
| |
440 | 442 |
| |
| |||
453 | 455 |
| |
454 | 456 |
| |
455 | 457 |
| |
456 |
| - | |
457 |
| - | |
458 |
| - | |
459 |
| - | |
460 |
| - | |
461 | 458 |
| |
462 |
| - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
463 | 462 |
| |
464 | 463 |
| |
465 | 464 |
| |
| |||
472 | 471 |
| |
473 | 472 |
| |
474 | 473 |
| |
| 474 | + | |
475 | 475 |
| |
476 | 476 |
| |
477 |
| - | |
478 |
| - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
479 | 480 |
| |
480 | 481 |
| |
| 482 | + | |
481 | 483 |
| |
482 | 484 |
| |
483 | 485 |
| |
|
Lines changed: 19 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
679 | 679 |
| |
680 | 680 |
| |
681 | 681 |
| |
682 |
| - | |
683 |
| - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
684 | 685 |
| |
685 | 686 |
| |
686 | 687 |
| |
| |||
966 | 967 |
| |
967 | 968 |
| |
968 | 969 |
| |
| 970 | + | |
969 | 971 |
| |
970 | 972 |
| |
971 | 973 |
| |
| |||
982 | 984 |
| |
983 | 985 |
| |
984 | 986 |
| |
985 |
| - | |
986 |
| - | |
| 987 | + | |
987 | 988 |
| |
988 | 989 |
| |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
989 | 1003 |
| |
| 1004 | + | |
990 | 1005 |
| |
991 | 1006 |
| |
992 | 1007 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5793 | 5793 |
| |
5794 | 5794 |
| |
5795 | 5795 |
| |
5796 |
| - | |
| 5796 | + | |
5797 | 5797 |
| |
5798 | 5798 |
| |
5799 |
| - | |
| 5799 | + | |
5800 | 5800 |
| |
5801 | 5801 |
| |
5802 | 5802 |
| |
|
0 commit comments
Comments
(0)