forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1df57f6
committed
Make reduce_outer_joins() smarter about semijoins.
reduce_outer_joins() mistakenly treated a semijoin like a left join forpurposes of deciding whether not-null constraints created by the join'squals could be passed down into the join's left-hand side (possiblyresulting in outer-join simplification there). Actually, semijoin workslike inner join for this purpose, ie, we do not need to see any rows thatcan't possibly satisfy the quals. Hence, two-line fix to treat semi andinner joins alike. Per observation by Andres Freund about a performancegripe from Yazan Suleiman.Back-patch to 8.4, since this oversight has been there since the currenthandling of semijoins was implemented.1 parent2fb64d8 commit1df57f6
1 file changed
+8
-3
lines changedLines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1745 | 1745 |
| |
1746 | 1746 |
| |
1747 | 1747 |
| |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
1748 | 1753 |
| |
1749 | 1754 |
| |
1750 | 1755 |
| |
| |||
1754 | 1759 |
| |
1755 | 1760 |
| |
1756 | 1761 |
| |
1757 |
| - | |
| 1762 | + | |
1758 | 1763 |
| |
1759 | 1764 |
| |
1760 | 1765 |
| |
| |||
1774 | 1779 |
| |
1775 | 1780 |
| |
1776 | 1781 |
| |
1777 |
| - | |
| 1782 | + | |
1778 | 1783 |
| |
1779 | 1784 |
| |
1780 | 1785 |
| |
1781 | 1786 |
| |
1782 | 1787 |
| |
1783 | 1788 |
| |
1784 |
| - | |
| 1789 | + | |
1785 | 1790 |
| |
1786 | 1791 |
| |
1787 | 1792 |
| |
|
0 commit comments
Comments
(0)