forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5c353d2
Fix "wrong varnullingrels" for subquery nestloop parameters.
If we apply outer join identity 3 when relation C is a subqueryhaving lateral references to relation B, then the lateral referenceswithin C continue to bear the original syntactically-correctvarnullingrels marks, but that won't match what is available fromthe outer side of the nestloop. Compensate for that inprocess_subquery_nestloop_params(). This is a slightly hacky fix,but we certainly don't want to re-plan C in toto for each possibleouter join order, so there's not a lot of better alternatives.Richard Guo and Tom Lane, per report from Markus WinandDiscussion:https://postgr.es/m/DFBB2D25-DE97-49CA-A60E-07C881EA59A7@winand.at1 parent2c0c98e commit5c353d2
File tree
4 files changed
+59
-10
lines changed- src
- backend/optimizer
- plan
- util
- test/regress
- expected
- sql
4 files changed
+59
-10
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2289 | 2289 |
| |
2290 | 2290 |
| |
2291 | 2291 |
| |
2292 |
| - | |
2293 |
| - | |
2294 |
| - | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
2295 | 2297 |
| |
2296 | 2298 |
| |
2297 | 2299 |
| |
|
Lines changed: 29 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
421 | 421 |
| |
422 | 422 |
| |
423 | 423 |
| |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
424 | 442 |
| |
425 |
| - | |
| 443 | + | |
426 | 444 |
| |
427 | 445 |
| |
428 | 446 |
| |
| |||
449 | 467 |
| |
450 | 468 |
| |
451 | 469 |
| |
452 |
| - | |
453 | 470 |
| |
454 | 471 |
| |
455 | 472 |
| |
456 | 473 |
| |
457 | 474 |
| |
458 | 475 |
| |
459 |
| - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
460 | 480 |
| |
461 | 481 |
| |
462 |
| - | |
| 482 | + | |
463 | 483 |
| |
464 | 484 |
| |
465 | 485 |
| |
| |||
480 | 500 |
| |
481 | 501 |
| |
482 | 502 |
| |
483 |
| - | |
484 | 503 |
| |
485 | 504 |
| |
486 | 505 |
| |
487 | 506 |
| |
488 | 507 |
| |
489 | 508 |
| |
490 |
| - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
491 | 513 |
| |
492 | 514 |
| |
493 |
| - | |
| 515 | + | |
494 | 516 |
| |
495 | 517 |
| |
496 | 518 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2589 | 2589 |
| |
2590 | 2590 |
| |
2591 | 2591 |
| |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
2592 | 2610 |
| |
2593 | 2611 |
| |
2594 | 2612 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
514 | 514 |
| |
515 | 515 |
| |
516 | 516 |
| |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
517 | 524 |
| |
518 | 525 |
| |
519 | 526 |
| |
|
0 commit comments
Comments
(0)