forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite38a55b
committed
Rework examine_opclause_expression to use varonleft
The examine_opclause_expression function needs to return information onwhich side of the operator we found the Var, but the variable was called"isgt" which is rather misleading (it assumes the operator is eitherless-than or greater-than, but it may be equality or something else).Other places in the planner use a variable called "varonleft" for thispurpose, so just adopt the same convention here.The code also assumed we don't care about this flag for equality, as(Var = Const) and (Const = Var) should be the same thing. But that doesnot work for cross-type operators, in which case we need to pass theparameters to the procedure in the right order. So just use the samecode for all types of expressions.This means we don't need to care about the selectivity estimationfunction anymore, at least not in this code. We should only get thesupported cases here (thanks to statext_is_compatible_clause).Reviewed-by: Tom LaneDiscussion:https://postgr.es/m/8736jdhbhc.fsf%40ansel.ydns.euBackpatch-to: 121 parent6f40ee4 commite38a55b
File tree
3 files changed
+26
-54
lines changed- src
- backend/statistics
- include/statistics
3 files changed
+26
-54
lines changedLines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1196 | 1196 |
| |
1197 | 1197 |
| |
1198 | 1198 |
| |
1199 |
| - | |
1200 |
| - | |
| 1199 | + | |
| 1200 | + | |
1201 | 1201 |
| |
1202 | 1202 |
| |
1203 |
| - | |
| 1203 | + | |
1204 | 1204 |
| |
1205 | 1205 |
| |
1206 | 1206 |
| |
1207 |
| - | |
| 1207 | + | |
1208 | 1208 |
| |
1209 | 1209 |
| |
1210 | 1210 |
| |
| |||
1225 | 1225 |
| |
1226 | 1226 |
| |
1227 | 1227 |
| |
1228 |
| - | |
| 1228 | + | |
1229 | 1229 |
| |
1230 | 1230 |
| |
1231 | 1231 |
| |
1232 | 1232 |
| |
1233 | 1233 |
| |
1234 |
| - | |
| 1234 | + | |
1235 | 1235 |
| |
1236 | 1236 |
| |
1237 | 1237 |
| |
| |||
1243 | 1243 |
| |
1244 | 1244 |
| |
1245 | 1245 |
| |
1246 |
| - | |
1247 |
| - | |
| 1246 | + | |
| 1247 | + | |
1248 | 1248 |
| |
1249 | 1249 |
| |
1250 | 1250 |
|
Lines changed: 17 additions & 45 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1581 | 1581 |
| |
1582 | 1582 |
| |
1583 | 1583 |
| |
1584 |
| - | |
1585 |
| - | |
1586 |
| - | |
1587 | 1584 |
| |
1588 | 1585 |
| |
1589 | 1586 |
| |
1590 |
| - | |
| 1587 | + | |
1591 | 1588 |
| |
1592 | 1589 |
| |
1593 | 1590 |
| |
1594 | 1591 |
| |
1595 |
| - | |
| 1592 | + | |
1596 | 1593 |
| |
1597 | 1594 |
| |
1598 | 1595 |
| |
| |||
1629 | 1626 |
| |
1630 | 1627 |
| |
1631 | 1628 |
| |
1632 |
| - | |
1633 |
| - | |
1634 |
| - | |
1635 |
| - | |
1636 |
| - | |
1637 |
| - | |
1638 |
| - | |
1639 |
| - | |
1640 |
| - | |
1641 |
| - | |
1642 |
| - | |
1643 |
| - | |
1644 |
| - | |
1645 |
| - | |
1646 |
| - | |
1647 |
| - | |
1648 |
| - | |
1649 |
| - | |
1650 |
| - | |
1651 |
| - | |
1652 |
| - | |
1653 |
| - | |
1654 |
| - | |
1655 |
| - | |
1656 |
| - | |
1657 |
| - | |
1658 |
| - | |
1659 |
| - | |
1660 |
| - | |
1661 |
| - | |
1662 |
| - | |
1663 |
| - | |
1664 |
| - | |
1665 |
| - | |
1666 |
| - | |
1667 |
| - | |
1668 |
| - | |
1669 |
| - | |
1670 |
| - | |
1671 |
| - | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
1672 | 1644 |
| |
1673 | 1645 |
| |
1674 | 1646 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
101 |
| - | |
| 101 | + | |
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
|
0 commit comments
Comments
(0)