forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit77585bc
committed
Do ScalarArrayOp estimation correctly when array is a stable expression.
Most estimation functions apply estimate_expression_value to see if theycan reduce an expression to a constant; the key difference is that itallows evaluation of stable as well as immutable functions in hopes ofending up with a simple Const node. scalararraysel didn't get the memothough, and neither did gincost_opexpr/gincost_scalararrayopexpr. Fixthat, and remove a now-unnecessary estimate_expression_value step in thesubsidiary function scalararraysel_containment.Per complaint from Alexey Klyukin. Back-patch to 9.3. The problemgoes back further, but I'm hesitant to change estimation behavior inlong-stable release branches.1 parent0c5783f commit77585bc
2 files changed
+26
-11
lines changedLines changed: 8 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 |
| - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
76 | 78 |
| |
77 | 79 |
| |
78 | 80 |
| |
| |||
99 | 101 |
| |
100 | 102 |
| |
101 | 103 |
| |
102 |
| - | |
| 104 | + | |
103 | 105 |
| |
104 |
| - | |
105 | 106 |
| |
106 | 107 |
| |
107 | 108 |
| |
|
Lines changed: 18 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1735 | 1735 |
| |
1736 | 1736 |
| |
1737 | 1737 |
| |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
1738 | 1742 |
| |
1739 | 1743 |
| |
1740 | 1744 |
| |
| |||
6856 | 6860 |
| |
6857 | 6861 |
| |
6858 | 6862 |
| |
6859 |
| - | |
| 6863 | + | |
| 6864 | + | |
6860 | 6865 |
| |
6861 | 6866 |
| |
6862 | 6867 |
| |
| |||
6880 | 6885 |
| |
6881 | 6886 |
| |
6882 | 6887 |
| |
| 6888 | + | |
| 6889 | + | |
| 6890 | + | |
6883 | 6891 |
| |
6884 | 6892 |
| |
6885 | 6893 |
| |
| |||
6918 | 6926 |
| |
6919 | 6927 |
| |
6920 | 6928 |
| |
6921 |
| - | |
| 6929 | + | |
| 6930 | + | |
6922 | 6931 |
| |
6923 | 6932 |
| |
6924 | 6933 |
| |
| |||
6943 | 6952 |
| |
6944 | 6953 |
| |
6945 | 6954 |
| |
| 6955 | + | |
| 6956 | + | |
| 6957 | + | |
6946 | 6958 |
| |
6947 | 6959 |
| |
6948 | 6960 |
| |
| |||
7160 | 7172 |
| |
7161 | 7173 |
| |
7162 | 7174 |
| |
7163 |
| - | |
| 7175 | + | |
| 7176 | + | |
7164 | 7177 |
| |
7165 | 7178 |
| |
7166 | 7179 |
| |
7167 | 7180 |
| |
7168 | 7181 |
| |
7169 | 7182 |
| |
7170 | 7183 |
| |
7171 |
| - | |
| 7184 | + | |
| 7185 | + | |
7172 | 7186 |
| |
7173 | 7187 |
| |
7174 | 7188 |
| |
|
0 commit comments
Comments
(0)