forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4f62250
committed
Make attstattarget nullable
This changes the pg_attribute field attstattarget into a nullablefield in the variable-length part of the row. If no value is set bythe user for attstattarget, it is now null instead of previously -1.This saves space in pg_attribute and tuple descriptors for mostpractical scenarios. (ATTRIBUTE_FIXED_PART_SIZE is reduced from 108to 104.) Also, null is the semantically more correct value.The ANALYZE code internally continues to represent the defaultstatistics target by -1, so that that code can avoid having to dealwith null values. But that is now contained to the ANALYZE code.Only the DDL code deals with attstattarget possibly null.For system columns, the field is now always null. The ANALYZE codeskips system columns anyway.To set a column's statistics target to the default value, the newcommand form ALTER TABLE ... SET STATISTICS DEFAULT can be used. (SETSTATISTICS -1 still works.)Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://www.postgresql.org/message-id/flat/4da8d211-d54d-44b9-9847-f2a9f1184c76@eisentraut.org1 parent45da693 commit4f62250
File tree
16 files changed
+113
-87
lines changed- doc/src/sgml/ref
- src
- backend
- access/common
- bootstrap
- catalog
- commands
- parser
- utils/cache
- bin/pg_dump
- include
- catalog
- commands
- utils
- test/regress/expected
16 files changed
+113
-87
lines changedLines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
| 54 | + | |
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
| |||
328 | 328 |
| |
329 | 329 |
| |
330 | 330 |
| |
331 |
| - | |
332 |
| - | |
333 |
| - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
334 | 336 |
| |
335 | 337 |
| |
336 | 338 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
453 | 453 |
| |
454 | 454 |
| |
455 | 455 |
| |
456 |
| - | |
457 |
| - | |
458 | 456 |
| |
459 | 457 |
| |
460 | 458 |
| |
| |||
639 | 637 |
| |
640 | 638 |
| |
641 | 639 |
| |
642 |
| - | |
643 | 640 |
| |
644 | 641 |
| |
645 | 642 |
| |
| |||
702 | 699 |
| |
703 | 700 |
| |
704 | 701 |
| |
705 |
| - | |
706 | 702 |
| |
707 | 703 |
| |
708 | 704 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
552 | 552 |
| |
553 | 553 |
| |
554 | 554 |
| |
555 |
| - | |
556 | 555 |
| |
557 | 556 |
| |
558 | 557 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
840 | 840 |
| |
841 | 841 |
| |
842 | 842 |
| |
843 |
| - | |
844 | 843 |
| |
845 | 844 |
| |
846 | 845 |
| |
|
Lines changed: 8 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
749 | 749 |
| |
750 | 750 |
| |
751 | 751 |
| |
752 |
| - | |
753 | 752 |
| |
754 | 753 |
| |
755 | 754 |
| |
756 | 755 |
| |
757 | 756 |
| |
758 | 757 |
| |
759 |
| - | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
760 | 762 |
| |
761 | 763 |
| |
762 | 764 |
| |
| |||
818 | 820 |
| |
819 | 821 |
| |
820 | 822 |
| |
821 |
| - | |
822 |
| - | |
823 |
| - | |
824 | 823 |
| |
825 | 824 |
| |
826 | 825 |
| |
| |||
1685 | 1684 |
| |
1686 | 1685 |
| |
1687 | 1686 |
| |
1688 |
| - | |
1689 |
| - | |
1690 |
| - | |
1691 | 1687 |
| |
1692 | 1688 |
| |
1693 | 1689 |
| |
| |||
1704 | 1700 |
| |
1705 | 1701 |
| |
1706 | 1702 |
| |
1707 |
| - | |
1708 |
| - | |
| 1703 | + | |
| 1704 | + | |
1709 | 1705 |
| |
| 1706 | + | |
| 1707 | + | |
1710 | 1708 |
| |
1711 | 1709 |
| |
1712 | 1710 |
| |
|
Lines changed: 15 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
325 | 325 |
| |
326 | 326 |
| |
327 | 327 |
| |
328 |
| - | |
329 | 328 |
| |
330 | 329 |
| |
331 | 330 |
| |
| |||
1780 | 1779 |
| |
1781 | 1780 |
| |
1782 | 1781 |
| |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
1783 | 1785 |
| |
1784 | 1786 |
| |
1785 | 1787 |
| |
1786 |
| - | |
1787 | 1788 |
| |
1788 | 1789 |
| |
1789 | 1790 |
| |
| |||
1793 | 1794 |
| |
1794 | 1795 |
| |
1795 | 1796 |
| |
1796 |
| - | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
1797 | 1803 |
| |
1798 |
| - | |
1799 |
| - | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
1800 | 1809 |
| |
1801 | 1810 |
| |
1802 | 1811 |
| |
1803 | 1812 |
| |
1804 | 1813 |
| |
1805 | 1814 |
| |
1806 | 1815 |
| |
1807 |
| - | |
| 1816 | + | |
1808 | 1817 |
| |
1809 | 1818 |
| |
1810 | 1819 |
| |
|
Lines changed: 19 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1004 | 1004 |
| |
1005 | 1005 |
| |
1006 | 1006 |
| |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
1007 | 1011 |
| |
1008 | 1012 |
| |
1009 | 1013 |
| |
| |||
1013 | 1017 |
| |
1014 | 1018 |
| |
1015 | 1019 |
| |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1016 | 1033 |
| |
1017 |
| - | |
| 1034 | + | |
1018 | 1035 |
| |
1019 | 1036 |
| |
1020 | 1037 |
| |
1021 | 1038 |
| |
1022 | 1039 |
| |
1023 | 1040 |
| |
1024 |
| - | |
| 1041 | + | |
1025 | 1042 |
| |
1026 | 1043 |
| |
1027 | 1044 |
| |
|
Lines changed: 34 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8543 | 8543 |
| |
8544 | 8544 |
| |
8545 | 8545 |
| |
8546 |
| - | |
| 8546 | + | |
| 8547 | + | |
8547 | 8548 |
| |
8548 | 8549 |
| |
8549 | 8550 |
| |
| 8551 | + | |
| 8552 | + | |
| 8553 | + | |
8550 | 8554 |
| |
8551 | 8555 |
| |
8552 | 8556 |
| |
| |||
8559 | 8563 |
| |
8560 | 8564 |
| |
8561 | 8565 |
| |
8562 |
| - | |
8563 |
| - | |
| 8566 | + | |
| 8567 | + | |
| 8568 | + | |
| 8569 | + | |
| 8570 | + | |
| 8571 | + | |
| 8572 | + | |
| 8573 | + | |
| 8574 | + | |
| 8575 | + | |
| 8576 | + | |
| 8577 | + | |
8564 | 8578 |
| |
8565 | 8579 |
| |
8566 | 8580 |
| |
| |||
8585 | 8599 |
| |
8586 | 8600 |
| |
8587 | 8601 |
| |
8588 |
| - | |
| 8602 | + | |
8589 | 8603 |
| |
8590 | 8604 |
| |
8591 | 8605 |
| |
| |||
8595 | 8609 |
| |
8596 | 8610 |
| |
8597 | 8611 |
| |
8598 |
| - | |
| 8612 | + | |
8599 | 8613 |
| |
8600 | 8614 |
| |
8601 | 8615 |
| |
| |||
8629 | 8643 |
| |
8630 | 8644 |
| |
8631 | 8645 |
| |
8632 |
| - | |
8633 |
| - | |
8634 |
| - | |
| 8646 | + | |
| 8647 | + | |
| 8648 | + | |
| 8649 | + | |
| 8650 | + | |
| 8651 | + | |
| 8652 | + | |
| 8653 | + | |
| 8654 | + | |
| 8655 | + | |
| 8656 | + | |
8635 | 8657 |
| |
8636 | 8658 |
| |
8637 | 8659 |
| |
8638 | 8660 |
| |
8639 | 8661 |
| |
8640 | 8662 |
| |
8641 |
| - | |
| 8663 | + | |
| 8664 | + | |
| 8665 | + | |
| 8666 | + | |
8642 | 8667 |
| |
8643 | 8668 |
| |
8644 | 8669 |
| |
|
Lines changed: 12 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
337 | 337 |
| |
338 | 338 |
| |
339 | 339 |
| |
| 340 | + | |
340 | 341 |
| |
341 | 342 |
| |
342 | 343 |
| |
| |||
2446 | 2447 |
| |
2447 | 2448 |
| |
2448 | 2449 |
| |
2449 |
| - | |
2450 |
| - | |
| 2450 | + | |
| 2451 | + | |
2451 | 2452 |
| |
2452 | 2453 |
| |
2453 | 2454 |
| |
2454 | 2455 |
| |
2455 | 2456 |
| |
2456 |
| - | |
| 2457 | + | |
2457 | 2458 |
| |
2458 | 2459 |
| |
2459 |
| - | |
2460 |
| - | |
| 2460 | + | |
| 2461 | + | |
2461 | 2462 |
| |
2462 | 2463 |
| |
2463 | 2464 |
| |
| |||
2469 | 2470 |
| |
2470 | 2471 |
| |
2471 | 2472 |
| |
2472 |
| - | |
| 2473 | + | |
2473 | 2474 |
| |
2474 | 2475 |
| |
2475 | 2476 |
| |
| |||
3070 | 3071 |
| |
3071 | 3072 |
| |
3072 | 3073 |
| |
| 3074 | + | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
3073 | 3079 |
| |
3074 | 3080 |
| |
3075 | 3081 |
| |
|
Lines changed: 0 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
872 | 872 |
| |
873 | 873 |
| |
874 | 874 |
| |
875 |
| - | |
876 |
| - | |
877 |
| - | |
878 |
| - | |
879 |
| - | |
880 |
| - | |
881 |
| - | |
882 |
| - | |
883 |
| - | |
884 |
| - | |
885 |
| - | |
886 |
| - | |
887 |
| - | |
888 |
| - | |
889 |
| - | |
890 |
| - | |
891 |
| - | |
892 |
| - | |
893 |
| - | |
894 |
| - | |
895 |
| - | |
896 |
| - | |
897 |
| - | |
898 |
| - | |
899 |
| - | |
900 |
| - | |
901 |
| - | |
902 | 875 |
| |
903 | 876 |
| |
904 | 877 |
| |
|
0 commit comments
Comments
(0)