forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit701fd0b
committed
Drop the rule against included index columns duplicating key columns.
The initial version of the included-index-column feature stated thatincluded columns couldn't be the same as any key column of the index.While it'd be pretty silly to do that, since the included column would beentirely redundant, we've never prohibited redundant index columns beforeso it's not very consistent to do so here. Moreover, the prohibitionwas itself badly implemented, so that it failed to reject columns thatwere effectively identical but not spelled quite alike, as reported byAditya Toshniwal.(Moreover, it's not hard to imagine that for some non-btree index types,such cases would be non-silly anyhow: the index might use a lossyrepresentation for key columns but be able to support retrieval of theoriginal form of included columns.)Hence, let's just drop the prohibition.In passing, do some copy-editing on the documentation for theincluded-column feature.Yugo Nagata; documentation and test corrections by meDiscussion:https://postgr.es/m/CAM9w-_mhBCys4fQNfaiQKTRrVWtoFrZ-wXmDuE9Nj5y-Y7aDKQ@mail.gmail.com1 parent3cb6462 commit701fd0b
File tree
8 files changed
+58
-64
lines changed- doc/src/sgml
- ref
- src
- backend/commands
- test/regress
- expected
- sql
8 files changed
+58
-64
lines changedLines changed: 14 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3753 | 3753 |
| |
3754 | 3754 |
| |
3755 | 3755 |
| |
3756 |
| - | |
| 3756 | + | |
3757 | 3757 |
| |
3758 | 3758 |
| |
3759 | 3759 |
| |
3760 | 3760 |
| |
3761 | 3761 |
| |
3762 | 3762 |
| |
3763 |
| - | |
3764 |
| - | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
3765 | 3766 |
| |
3766 | 3767 |
| |
3767 | 3768 |
| |
| |||
3867 | 3868 |
| |
3868 | 3869 |
| |
3869 | 3870 |
| |
3870 |
| - | |
| 3871 | + | |
| 3872 | + | |
3871 | 3873 |
| |
3872 | 3874 |
| |
3873 | 3875 |
| |
| |||
3878 | 3880 |
| |
3879 | 3881 |
| |
3880 | 3882 |
| |
3881 |
| - | |
3882 |
| - | |
3883 |
| - | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + | |
| 3886 | + | |
3884 | 3887 |
| |
3885 | 3888 |
| |
3886 | 3889 |
| |
| |||
3889 | 3892 |
| |
3890 | 3893 |
| |
3891 | 3894 |
| |
3892 |
| - | |
3893 |
| - | |
| 3895 | + | |
| 3896 | + | |
| 3897 | + | |
3894 | 3898 |
| |
3895 | 3899 |
| |
3896 | 3900 |
| |
| |||
3900 | 3904 |
| |
3901 | 3905 |
| |
3902 | 3906 |
| |
3903 |
| - | |
| 3907 | + | |
3904 | 3908 |
| |
3905 | 3909 |
| |
3906 | 3910 |
| |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
116 |
| - | |
117 | 115 |
| |
118 | 116 |
| |
| 117 | + | |
| 118 | + | |
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
| |||
987 | 987 |
| |
988 | 988 |
| |
989 | 989 |
| |
990 |
| - | |
991 |
| - | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
992 | 993 |
| |
993 | 994 |
| |
994 | 995 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
639 | 639 |
| |
640 | 640 |
| |
641 | 641 |
| |
642 |
| - | |
| 642 | + | |
643 | 643 |
| |
644 | 644 |
| |
645 | 645 |
| |
| |||
648 | 648 |
| |
649 | 649 |
| |
650 | 650 |
| |
651 |
| - | |
652 |
| - | |
653 |
| - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
654 | 654 |
| |
655 | 655 |
| |
656 | 656 |
| |
|
Lines changed: 20 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
158 | 161 |
| |
159 | 162 |
| |
160 | 163 |
| |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 |
| - | |
165 |
| - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
166 | 169 |
| |
167 | 170 |
| |
168 | 171 |
| |
169 | 172 |
| |
170 |
| - | |
| 173 | + | |
171 | 174 |
| |
172 | 175 |
| |
173 | 176 |
| |
| |||
181 | 184 |
| |
182 | 185 |
| |
183 | 186 |
| |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
| 187 | + | |
| 188 | + | |
193 | 189 |
| |
194 | 190 |
| |
195 | 191 |
| |
| |||
376 | 372 |
| |
377 | 373 |
| |
378 | 374 |
| |
379 |
| - | |
| 375 | + | |
380 | 376 |
| |
381 | 377 |
| |
382 | 378 |
| |
| |||
789 | 785 |
| |
790 | 786 |
| |
791 | 787 |
| |
792 |
| - | |
793 |
| - | |
| 788 | + | |
| 789 | + | |
794 | 790 |
| |
795 | 791 |
| |
796 | 792 |
| |
|
Lines changed: 4 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
869 | 869 |
| |
870 | 870 |
| |
871 | 871 |
| |
872 |
| - | |
873 |
| - | |
874 |
| - | |
| 872 | + | |
| 873 | + | |
875 | 874 |
| |
876 | 875 |
| |
877 | 876 |
| |
| |||
916 | 915 |
| |
917 | 916 |
| |
918 | 917 |
| |
919 |
| - | |
920 |
| - | |
921 |
| - | |
| 918 | + | |
| 919 | + | |
922 | 920 |
| |
923 | 921 |
| |
924 | 922 |
| |
|
Lines changed: 1 addition & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
369 | 369 |
| |
370 | 370 |
| |
371 | 371 |
| |
372 |
| - | |
373 |
| - | |
374 |
| - | |
375 |
| - | |
376 |
| - | |
377 | 372 |
| |
378 | 373 |
| |
379 | 374 |
| |
| |||
596 | 591 |
| |
597 | 592 |
| |
598 | 593 |
| |
599 |
| - | |
| 594 | + | |
600 | 595 |
| |
601 | 596 |
| |
602 | 597 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
14 | 13 |
| |
15 | 14 |
| |
16 | 15 |
| |
17 |
| - | |
18 |
| - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
12 |
| - | |
13 |
| - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
|
0 commit comments
Comments
(0)