forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb9c755a
committed
In clause_is_computable_at(), test required_relids for clone clauses.
Use the clause's required_relids not clause_relids for testingwhether it is computable at the current join level, if it is aclone clause generated by deconstruct_distribute_oj_quals().Arguably, this is more correct and we should do it for all clauses;that would at least remove the handwavy claim that we are doingit to save cycles compared to inspecting Vars individually.However, attempting to do that exposes that we are not being carefulto compute an accurate value for required_relids in all cases.I'm unsure whether it's a good idea to attempt to do that for v16,or leave it as future clean-up. In the meantime, this quick hackdemonstrably fixes some cases, so let's squeeze it in for beta1.Patch by me, but great thanks to Richard Guo for investigationand testing. The new test cases are all modeled on his examples.Discussion:https://postgr.es/m/CAMbWs4-_vwkBij4XOQ5ukxUvLgwTm0kS5_DO9CicUeKbEfKjUw@mail.gmail.com1 parenteabb225 commitb9c755a
File tree
3 files changed
+100
-1
lines changed- src
- backend/optimizer/util
- test/regress
- expected
- sql
3 files changed
+100
-1
lines changedLines changed: 12 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
544 | 544 |
| |
545 | 545 |
| |
546 | 546 |
| |
547 |
| - | |
| 547 | + | |
548 | 548 |
| |
549 | 549 |
| |
550 | 550 |
| |
551 | 551 |
| |
552 | 552 |
| |
553 | 553 |
| |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
554 | 565 |
| |
555 | 566 |
| |
556 | 567 |
| |
|
Lines changed: 68 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2500 | 2500 |
| |
2501 | 2501 |
| |
2502 | 2502 |
| |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
2503 | 2571 |
| |
2504 | 2572 |
| |
2505 | 2573 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
488 | 488 |
| |
489 | 489 |
| |
490 | 490 |
| |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
491 | 511 |
| |
492 | 512 |
| |
493 | 513 |
| |
|
0 commit comments
Comments
(0)