Commit 73b7f48
committed
Improve run-time partition pruning to handle any stable expression.
The initial coding of the run-time-pruning feature only coped with cases
where the partition key(s) are compared to Params. That is a bit silly;
we can allow it to work with any non-Var-containing stable expression, as
long as we take special care with expressions containing PARAM_EXEC Params.
The code is hardly any longer this way, and it's considerably clearer
(IMO at least). Per gripe from Pavel Stehule.
David Rowley, whacked around a bit by me
Discussion: https://postgr.es/m/CAFj8pRBjrufA3ocDm8o4LPGNye9Y+pm1b9kCwode4X04CULG3g@mail.gmail.com1 parent c83e202 commit 73b7f48
File tree
11 files changed
+461
-271
lines changed- src
- backend
- executor
- nodes
- partitioning
- include
- executor
- nodes
- partitioning
- test/regress
- expected
- sql
11 files changed
+461
-271
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 142 | + | |
| 143 | + | |
146 | 144 | | |
147 | | - | |
| 145 | + | |
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
151 | 149 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
159 | 157 | | |
160 | 158 | | |
161 | 159 | | |
| |||
175 | 173 | | |
176 | 174 | | |
177 | 175 | | |
178 | | - | |
179 | | - | |
| 176 | + | |
| 177 | + | |
180 | 178 | | |
181 | | - | |
| 179 | + | |
182 | 180 | | |
183 | 181 | | |
184 | 182 | | |
185 | | - | |
186 | 183 | | |
187 | 184 | | |
188 | 185 | | |
189 | 186 | | |
190 | 187 | | |
191 | 188 | | |
192 | 189 | | |
193 | | - | |
| 190 | + | |
194 | 191 | | |
195 | 192 | | |
196 | 193 | | |
| |||
341 | 338 | | |
342 | 339 | | |
343 | 340 | | |
344 | | - | |
345 | | - | |
346 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
347 | 344 | | |
348 | 345 | | |
349 | 346 | | |
350 | | - | |
| 347 | + | |
351 | 348 | | |
352 | 349 | | |
353 | 350 | | |
| |||
531 | 528 | | |
532 | 529 | | |
533 | 530 | | |
534 | | - | |
535 | | - | |
536 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
537 | 534 | | |
538 | 535 | | |
539 | 536 | | |
| |||
606 | 603 | | |
607 | 604 | | |
608 | 605 | | |
609 | | - | |
610 | | - | |
611 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
612 | 609 | | |
613 | 610 | | |
614 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2175 | 2175 | | |
2176 | 2176 | | |
2177 | 2177 | | |
| 2178 | + | |
2178 | 2179 | | |
2179 | 2180 | | |
2180 | | - | |
2181 | | - | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
2182 | 2185 | | |
2183 | 2186 | | |
2184 | 2187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1742 | 1742 | | |
1743 | 1743 | | |
1744 | 1744 | | |
| 1745 | + | |
1745 | 1746 | | |
1746 | 1747 | | |
1747 | 1748 | | |
| |||
1751 | 1752 | | |
1752 | 1753 | | |
1753 | 1754 | | |
1754 | | - | |
1755 | | - | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
1756 | 1762 | | |
1757 | 1763 | | |
1758 | 1764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1363 | 1363 | | |
1364 | 1364 | | |
1365 | 1365 | | |
| 1366 | + | |
1366 | 1367 | | |
1367 | 1368 | | |
1368 | | - | |
1369 | | - | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
1370 | 1373 | | |
1371 | 1374 | | |
1372 | 1375 | | |
| |||
0 commit comments