forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit950f80d
committed
Prevent improper reordering of antijoins vs. outer joins.
An outer join appearing within the RHS of an antijoin can't commute withthe antijoin, but somehow I missed teaching make_outerjoininfo() aboutthat. In Teodor Sigaev's recent trouble report, this manifests as a"could not find RelOptInfo for given relids" error within eqjoinsel();but I think silently wrong query results are possible too, if the plannermisorders the joins and doesn't happen to trigger any internal consistencychecks. It's broken as far back as we had antijoins, so back-patch to allsupported branches.1 parent5eab0f1 commit950f80d
File tree
3 files changed
+63
-3
lines changed- src
- backend/optimizer/plan
- test/regress
- expected
- sql
3 files changed
+63
-3
lines changedLines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
694 | 694 |
| |
695 | 695 |
| |
696 | 696 |
| |
697 |
| - | |
698 |
| - | |
699 |
| - | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
700 | 700 |
| |
701 | 701 |
| |
702 | 702 |
| |
| |||
713 | 713 |
| |
714 | 714 |
| |
715 | 715 |
| |
| 716 | + | |
716 | 717 |
| |
717 | 718 |
| |
718 | 719 |
| |
|
Lines changed: 42 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2277 | 2277 |
| |
2278 | 2278 |
| |
2279 | 2279 |
| |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
2280 | 2322 |
| |
2281 | 2323 |
| |
2282 | 2324 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
443 | 443 |
| |
444 | 444 |
| |
445 | 445 |
| |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
446 | 463 |
| |
447 | 464 |
| |
448 | 465 |
| |
|
0 commit comments
Comments
(0)