forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc44d013
committed
Delay creation of subplan tlist until after create_plan().
Once upon a time it was necessary for grouping_planner() to determinethe tlist it wanted from the scan/join plan subtree before it calledquery_planner(), because query_planner() would actually make a Plan usingthat. But we refactored things a long time ago to delay construction ofthe Plan tree till later, so there's no need to build that tlist until(and indeed unless) we're ready to plaster it onto the Plan. The onlything query_planner() cares about is what Vars are going to be needed forthe tlist, and it can perfectly well get that by looking at the real tlistrather than some masticated version.Well, actually, there is one minor glitch in that argument, which is thatmake_subplanTargetList also adds Vars appearing only in HAVING to thetlist it produces. So now we have to account for HAVING explicitly inbuild_base_rel_tlists. But that just adds a few lines of code, andI doubt it moves the needle much on processing time; we might be doingpull_var_clause() twice on the havingQual, but before we had it scanningdummy tlist entries instead.This is a very small down payment on rationalizing grouping_plannerenough so it can be refactored.1 parentf81c966 commitc44d013
2 files changed
+34
-20
lines changedLines changed: 18 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
140 |
| - | |
| 140 | + | |
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
| |||
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
157 | 174 |
| |
158 | 175 |
| |
159 | 176 |
| |
|
Lines changed: 16 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1415 | 1415 |
| |
1416 | 1416 |
| |
1417 | 1417 |
| |
1418 |
| - | |
1419 |
| - | |
1420 |
| - | |
1421 | 1418 |
| |
1422 | 1419 |
| |
1423 | 1420 |
| |
| |||
1548 | 1545 |
| |
1549 | 1546 |
| |
1550 | 1547 |
| |
1551 |
| - | |
1552 |
| - | |
1553 |
| - | |
1554 |
| - | |
1555 |
| - | |
1556 |
| - | |
1557 |
| - | |
1558 | 1548 |
| |
1559 | 1549 |
| |
1560 | 1550 |
| |
| |||
1612 | 1602 |
| |
1613 | 1603 |
| |
1614 | 1604 |
| |
1615 |
| - | |
| 1605 | + | |
1616 | 1606 |
| |
1617 | 1607 |
| |
1618 | 1608 |
| |
| |||
1888 | 1878 |
| |
1889 | 1879 |
| |
1890 | 1880 |
| |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1891 | 1884 |
| |
1892 | 1885 |
| |
1893 | 1886 |
| |
| |||
1896 | 1889 |
| |
1897 | 1890 |
| |
1898 | 1891 |
| |
1899 |
| - | |
1900 | 1892 |
| |
1901 | 1893 |
| |
1902 |
| - | |
1903 |
| - | |
1904 |
| - | |
1905 |
| - | |
1906 |
| - | |
1907 |
| - | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
1908 | 1901 |
| |
1909 | 1902 |
| |
1910 | 1903 |
| |
1911 | 1904 |
| |
1912 | 1905 |
| |
1913 | 1906 |
| |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
1914 | 1911 |
| |
1915 |
| - | |
| 1912 | + | |
1916 | 1913 |
| |
1917 | 1914 |
| |
1918 | 1915 |
| |
|
0 commit comments
Comments
(0)