forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita63378a
committed
Use column collation for extended statistics
The current extended statistics code was a bit confused which collationto use. When building the statistics, the collations defined as defaultfor the data types were used (since commit5e09280). The MCV code washowever using the column collations for MCV serialization, and thenDEFAULT_COLLATION_OID when computing estimates. So overall the code wasusing all three possible options, inconsistently.This uses the column colation everywhere - this makes it consistent withwhat5e09280 did for regular stats. We however do not track thecollations in a catalog, because we can derive them from column-levelinformation. This may need to change in the future, e.g. after allowingstatistics on expressions.Reviewed-by: Tom LaneDiscussion:https://postgr.es/m/8736jdhbhc.fsf%40ansel.ydns.euBackpatch-to: 121 parente38a55b commita63378a
File tree
4 files changed
+17
-6
lines changed- src/backend
- commands
- statistics
4 files changed
+17
-6
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
485 | 485 |
| |
486 | 486 |
| |
487 | 487 |
| |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
488 | 492 |
| |
489 | 493 |
| |
490 | 494 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
273 | 273 |
| |
274 | 274 |
| |
275 | 275 |
| |
276 |
| - | |
| 276 | + | |
277 | 277 |
| |
278 | 278 |
| |
279 | 279 |
| |
|
Lines changed: 11 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
366 | 366 |
| |
367 | 367 |
| |
368 | 368 |
| |
369 |
| - | |
| 369 | + | |
370 | 370 |
| |
371 | 371 |
| |
372 | 372 |
| |
| |||
686 | 686 |
| |
687 | 687 |
| |
688 | 688 |
| |
689 |
| - | |
| 689 | + | |
690 | 690 |
| |
691 | 691 |
| |
692 | 692 |
| |
| |||
1630 | 1630 |
| |
1631 | 1631 |
| |
1632 | 1632 |
| |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
1633 | 1640 |
| |
1634 | 1641 |
| |
1635 | 1642 |
| |
1636 |
| - | |
| 1643 | + | |
1637 | 1644 |
| |
1638 | 1645 |
| |
1639 | 1646 |
| |
1640 | 1647 |
| |
1641 |
| - | |
| 1648 | + | |
1642 | 1649 |
| |
1643 | 1650 |
| |
1644 | 1651 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
477 | 477 |
| |
478 | 478 |
| |
479 | 479 |
| |
480 |
| - | |
| 480 | + | |
481 | 481 |
| |
482 | 482 |
| |
483 | 483 |
| |
|
0 commit comments
Comments
(0)