forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit808d1f8
committed
Fix booltestsel() for case where we have NULL stats but not MCV stats.
In a boolean column that contains mostly nulls, ANALYZE might not findenough non-null values to populate the most-common-values stats,but it would still create a pg_statistic entry with stanullfrac set.The logic in booltestsel() for this situation did the wrong thing for"col IS NOT TRUE" and "col IS NOT FALSE" tests, forgetting that nullvalues would satisfy these tests (so that the true selectivity wouldbe close to one, not close to zero). Per bug #8274.Fix by Andrew Gierth, some comment-smithing by me.1 parent7f5cfe9 commit808d1f8
1 file changed
+10
-12
lines changedLines changed: 10 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1529 | 1529 |
| |
1530 | 1530 |
| |
1531 | 1531 |
| |
1532 |
| - | |
| 1532 | + | |
1533 | 1533 |
| |
1534 | 1534 |
| |
1535 | 1535 |
| |
1536 | 1536 |
| |
1537 |
| - | |
1538 |
| - | |
1539 |
| - | |
1540 |
| - | |
| 1537 | + | |
1541 | 1538 |
| |
1542 | 1539 |
| |
1543 | 1540 |
| |
1544 |
| - | |
1545 |
| - | |
1546 |
| - | |
1547 |
| - | |
1548 |
| - | |
| 1541 | + | |
1549 | 1542 |
| |
1550 | 1543 |
| |
1551 | 1544 |
| |
1552 |
| - | |
1553 | 1545 |
| |
1554 |
| - | |
| 1546 | + | |
1555 | 1547 |
| |
1556 | 1548 |
| |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
1557 | 1555 |
| |
1558 | 1556 |
| |
1559 | 1557 |
| |
|
0 commit comments
Comments
(0)