forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit70988b7
committed
Improve makeArrayTypeName's algorithm for choosing array type names.
As before, we start by prepending one underscore (truncating thebase name if necessary). But if there is a conflict, then instead ofprepending more and more underscores, append an underscore and somedigits, in much the same way that ChooseRelationName does. Whilethe previous logic could be driven to fail by creating a lot oftypes with long names differing only near the end, this version seemscertain enough to eventually succeed that we can remove the failurecode path that was there before.While at it, undo6df7a96's decision to split this code out ofmakeArrayTypeName. That wasn't actually accomplishing anything,because no other function was using it --- and it would have beenwrong to do so. The convention that a prefix "_" means an array,not something else, is too ancient to mess with.Andrey Lepikhov and Dmitry Koval, reviewed by Masahiko Sawada and myselfDiscussion:https://postgr.es/m/b84cd82c-cc67-198a-8b1c-60f44e1259ad@postgrespro.ru1 parent8bb3ad4 commit70988b7
File tree
2 files changed
+37
-59
lines changed- src
- backend/catalog
- test/regress/expected
2 files changed
+37
-59
lines changedLines changed: 34 additions & 56 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
| |||
37 | 38 |
| |
38 | 39 |
| |
39 | 40 |
| |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 | 41 |
| |
44 | 42 |
| |
45 | 43 |
| |
| |||
815 | 813 |
| |
816 | 814 |
| |
817 | 815 |
| |
818 |
| - | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
819 | 819 |
| |
820 |
| - | |
821 |
| - | |
822 |
| - | |
823 |
| - | |
824 |
| - | |
825 |
| - | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
826 | 849 |
| |
827 |
| - | |
| 850 | + | |
828 | 851 |
| |
829 | 852 |
| |
830 | 853 |
| |
| |||
931 | 954 |
| |
932 | 955 |
| |
933 | 956 |
| |
934 |
| - | |
935 |
| - | |
936 |
| - | |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 |
| - | |
942 |
| - | |
943 |
| - | |
944 |
| - | |
945 |
| - | |
946 |
| - | |
947 |
| - | |
948 |
| - | |
949 |
| - | |
950 |
| - | |
951 |
| - | |
952 |
| - | |
953 |
| - | |
954 |
| - | |
955 |
| - | |
956 |
| - | |
957 |
| - | |
958 |
| - | |
959 |
| - | |
960 |
| - | |
961 |
| - | |
962 |
| - | |
963 |
| - | |
964 |
| - | |
965 |
| - | |
966 |
| - | |
967 |
| - | |
968 |
| - | |
969 |
| - | |
970 |
| - | |
971 |
| - | |
972 |
| - | |
973 |
| - | |
974 |
| - | |
975 |
| - | |
976 |
| - | |
977 |
| - | |
978 |
| - |
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
200 |
| - | |
201 |
| - | |
202 |
| - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
203 | 203 |
| |
204 | 204 |
| |
205 | 205 |
| |
|
0 commit comments
Comments
(0)