Commit b5fb673
committed
Don't constrain self-join removal due to PHVs
Self-join removal appears to be safe to apply with placeholder variables
as long as we handle PlaceHolderVar in replace_varno_walker() and replace
relid in phinfo->ph_lateral.
Discussion: https://postgr.es/m/18187-831da249cbd2ff8e%40postgresql.org
Author: Richard Guo
Reviewed-by: Andrei Lepikhov1 parent 8a8ed91 commit b5fb673
File tree
3 files changed
+39
-28
lines changed- src
- backend/optimizer/plan
- test/regress
- expected
- sql
3 files changed
+39
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
475 | 477 | | |
476 | 478 | | |
477 | 479 | | |
| |||
2115 | 2117 | | |
2116 | 2118 | | |
2117 | 2119 | | |
2118 | | - | |
| 2120 | + | |
2119 | 2121 | | |
2120 | | - | |
2121 | | - | |
2122 | | - | |
2123 | | - | |
2124 | | - | |
2125 | | - | |
2126 | | - | |
2127 | | - | |
2128 | | - | |
2129 | | - | |
2130 | | - | |
2131 | | - | |
2132 | 2122 | | |
2133 | 2123 | | |
2134 | 2124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6821 | 6821 | | |
6822 | 6822 | | |
6823 | 6823 | | |
6824 | | - | |
6825 | | - | |
6826 | | - | |
| 6824 | + | |
| 6825 | + | |
6827 | 6826 | | |
6828 | 6827 | | |
6829 | | - | |
6830 | | - | |
| 6828 | + | |
| 6829 | + | |
6831 | 6830 | | |
6832 | | - | |
6833 | | - | |
6834 | | - | |
6835 | | - | |
6836 | | - | |
6837 | | - | |
| 6831 | + | |
| 6832 | + | |
| 6833 | + | |
| 6834 | + | |
| 6835 | + | |
| 6836 | + | |
| 6837 | + | |
| 6838 | + | |
| 6839 | + | |
| 6840 | + | |
| 6841 | + | |
| 6842 | + | |
| 6843 | + | |
| 6844 | + | |
| 6845 | + | |
| 6846 | + | |
| 6847 | + | |
| 6848 | + | |
| 6849 | + | |
| 6850 | + | |
| 6851 | + | |
| 6852 | + | |
| 6853 | + | |
| 6854 | + | |
6838 | 6855 | | |
6839 | 6856 | | |
6840 | 6857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2600 | 2600 | | |
2601 | 2601 | | |
2602 | 2602 | | |
2603 | | - | |
2604 | | - | |
2605 | | - | |
| 2603 | + | |
| 2604 | + | |
2606 | 2605 | | |
2607 | 2606 | | |
2608 | 2607 | | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
2609 | 2613 | | |
2610 | 2614 | | |
2611 | 2615 | | |
| |||
0 commit comments