forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9688c4e
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 parent507069d commit9688c4e
1 file changed
+8
-3
lines changedLines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1840 | 1840 |
| |
1841 | 1841 |
| |
1842 | 1842 |
| |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
1843 | 1848 |
| |
1844 | 1849 |
| |
1845 | 1850 |
| |
| |||
1849 | 1854 |
| |
1850 | 1855 |
| |
1851 | 1856 |
| |
1852 |
| - | |
| 1857 | + | |
1853 | 1858 |
| |
1854 | 1859 |
| |
1855 | 1860 |
| |
| |||
1869 | 1874 |
| |
1870 | 1875 |
| |
1871 | 1876 |
| |
1872 |
| - | |
| 1877 | + | |
1873 | 1878 |
| |
1874 | 1879 |
| |
1875 | 1880 |
| |
1876 | 1881 |
| |
1877 | 1882 |
| |
1878 | 1883 |
| |
1879 |
| - | |
| 1884 | + | |
1880 | 1885 |
| |
1881 | 1886 |
| |
1882 | 1887 |
| |
|
0 commit comments
Comments
(0)