forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commiteb919e8
committed
Resurrect the "last ditch" code path in join_search_one_level().
This essentially reverts commite54b10a,in which I'd decided that the "last ditch" join logic was useless. Thefolly of that is now exposed by a report from Pavel Stehule: although thefunction should always find at least one join in a self-contained joinproblem, it can still fail to do so in a sub-problem created by artificialfrom_collapse_limit or join_collapse_limit constraints. Adjust thecomments to describe this, and simplify the code a bit to match the newcoding of the earlier loop in the function.I'm not terribly happy about this: I still subscribe to the opinion statedin the previous commit message that the "last ditch" code can obscure logicbugs elsewhere. But the alternative seems to be to complicate the earliertests for does-this-relation-have-a-join-clause to the point where they cantell whether the join clauses link outside the current join sub-problem.And that looks messy, slow, and possibly a source of bugs in itself.In any case, now is not the time to be inserting experimental code into9.2, so let's just go back to the time-tested solution.1 parent864de65 commiteb919e8
1 file changed
+56
-15
lines changedLines changed: 56 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
181 |
| - | |
182 |
| - | |
183 |
| - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
184 | 188 |
| |
185 |
| - | |
186 |
| - | |
187 |
| - | |
| 189 | + | |
| 190 | + | |
188 | 191 |
| |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
193 |
| - | |
194 |
| - | |
195 |
| - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
196 | 197 |
| |
197 | 198 |
| |
198 |
| - | |
199 |
| - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
200 | 234 |
| |
201 | 235 |
| |
202 | 236 |
| |
| |||
724 | 758 |
| |
725 | 759 |
| |
726 | 760 |
| |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
727 | 768 |
| |
728 | 769 |
| |
729 | 770 |
| |
|
0 commit comments
Comments
(0)