- Notifications
You must be signed in to change notification settings - Fork5
Commit656beff
committed
Adjust string comparison so that only bitwise-equal strings are considered
equal: if strcoll claims two strings are equal, check it with strcmp, andsort according to strcmp if not identical. This fixes inconsistentbehavior under glibc's hu_HU locale, and probably under some other localesas well. Also, take advantage of the now-well-defined behavior to speed uptexteq, textne, bpchareq, bpcharne: they may as well just do a bitwisecomparison and not bother with strcoll at all.NOTE: affected databases may need to REINDEX indexes on text columns to besure they are self-consistent.1 parent7b53b45 commit656beff
File tree
3 files changed
+40
-15
lines changed- src/backend
- access/hash
- utils/adt
3 files changed
+40
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
618 | 621 | | |
619 | 622 | | |
620 | 623 | | |
621 | | - | |
| 624 | + | |
622 | 625 | | |
623 | 626 | | |
624 | 627 | | |
| |||
638 | 641 | | |
639 | 642 | | |
640 | 643 | | |
641 | | - | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
642 | 648 | | |
643 | 649 | | |
644 | 650 | | |
645 | | - | |
| 651 | + | |
646 | 652 | | |
647 | 653 | | |
648 | 654 | | |
| |||
789 | 795 | | |
790 | 796 | | |
791 | 797 | | |
792 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
793 | 801 | | |
794 | 802 | | |
795 | 803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
941 | 950 | | |
942 | 951 | | |
943 | 952 | | |
| |||
984 | 993 | | |
985 | 994 | | |
986 | 995 | | |
987 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
988 | 1000 | | |
989 | 1001 | | |
990 | 1002 | | |
991 | | - | |
| 1003 | + | |
| 1004 | + | |
992 | 1005 | | |
993 | 1006 | | |
994 | 1007 | | |
| |||
1003 | 1016 | | |
1004 | 1017 | | |
1005 | 1018 | | |
1006 | | - | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
1007 | 1023 | | |
1008 | 1024 | | |
1009 | 1025 | | |
1010 | | - | |
| 1026 | + | |
| 1027 | + | |
1011 | 1028 | | |
1012 | 1029 | | |
1013 | 1030 | | |
| |||
0 commit comments
Comments
(0)