forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfc032be
committed
Be more careful about marking catalog columns NOT NULL by default.
The bug fixed in commit72eab84 would not have occurred if initdbhad a less surprising rule about which columns should be markedNOT NULL by default. Let's make that rule be strictly that thecolumn must be fixed-width and its predecessors must be fixed-widthand NOT NULL, removing the hacky and unsafe exceptions for oidvectorand int2vector.Since we do still want all existing oidvector and int2vector columnsto be marked NOT NULL, we have to put BKI_FORCE_NOT_NULL labels onthem. But making this less magic and more documented seems like agood idea, even if it's a shade more verbose.I didn't bump catversion since the initial catalog contents arenot actually changed by this patch. Note however that thecontents of postgres.bki do change, and feeding an old copy ofthat to a new backend will produce wrong results.Discussion:https://postgr.es/m/204760.1595181800@sss.pgh.pa.us1 parent3e66019 commitfc032be
File tree
9 files changed
+46
-42
lines changed- doc/src/sgml
- src
- backend
- bootstrap
- catalog
- include/catalog
9 files changed
+46
-42
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
122 |
| - | |
| 122 | + | |
| 123 | + | |
123 | 124 |
| |
124 | 125 |
| |
125 | 126 |
| |
|
Lines changed: 5 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
770 | 770 |
| |
771 | 771 |
| |
772 | 772 |
| |
773 |
| - | |
774 |
| - | |
775 |
| - | |
776 |
| - | |
777 |
| - | |
| 773 | + | |
| 774 | + | |
778 | 775 |
| |
779 |
| - | |
780 |
| - | |
781 |
| - | |
782 |
| - | |
783 |
| - | |
784 |
| - | |
| 776 | + | |
785 | 777 |
| |
786 | 778 |
| |
787 | 779 |
| |
788 | 780 |
| |
789 | 781 |
| |
790 | 782 |
| |
791 |
| - | |
| 783 | + | |
| 784 | + | |
792 | 785 |
| |
793 | 786 |
| |
794 | 787 |
| |
|
Lines changed: 18 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
713 | 713 |
| |
714 | 714 |
| |
715 | 715 |
| |
716 |
| - | |
717 |
| - | |
| 716 | + | |
| 717 | + | |
718 | 718 |
| |
719 | 719 |
| |
720 | 720 |
| |
721 | 721 |
| |
722 | 722 |
| |
723 | 723 |
| |
724 | 724 |
| |
725 |
| - | |
726 |
| - | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
727 | 731 |
| |
728 | 732 |
| |
729 | 733 |
| |
| |||
765 | 769 |
| |
766 | 770 |
| |
767 | 771 |
| |
768 |
| - | |
| 772 | + | |
769 | 773 |
| |
770 | 774 |
| |
771 | 775 |
| |
772 | 776 |
| |
773 | 777 |
| |
774 |
| - | |
| 778 | + | |
775 | 779 |
| |
776 | 780 |
| |
777 | 781 |
| |
| |||
801 | 805 |
| |
802 | 806 |
| |
803 | 807 |
| |
804 |
| - | |
| 808 | + | |
805 | 809 |
| |
806 | 810 |
| |
807 | 811 |
| |
808 |
| - | |
809 |
| - | |
810 |
| - | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
811 | 816 |
| |
812 |
| - | |
813 |
| - | |
814 |
| - | |
815 |
| - | |
816 |
| - | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
817 | 820 |
| |
818 | 821 |
| |
819 | 822 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 |
| - | |
50 |
| - | |
| 49 | + | |
| 50 | + | |
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
|
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
| 47 | + | |
| 48 | + | |
48 | 49 |
| |
49 | 50 |
| |
50 |
| - | |
51 |
| - | |
52 |
| - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 |
| |
54 | 56 |
| |
55 | 57 |
| |
|
Lines changed: 9 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
45 |
| - | |
46 |
| - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 |
| |
48 | 50 |
| |
49 |
| - | |
50 |
| - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 |
| |
52 | 56 |
| |
53 | 57 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 |
| - | |
| 95 | + | |
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
| 50 | + | |
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
| 58 | + | |
58 | 59 |
| |
59 | 60 |
| |
60 | 61 |
| |
|
0 commit comments
Comments
(0)