forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitaeed17d
committed
Use radix tree for character encoding conversions.
Replace the mapping tables used to convert between UTF-8 and othercharacter encodings with new radix tree-based maps. Looking up an entry ina radix tree is much faster than a binary search in the old maps. As abonus, the radix tree representation is also more compact, making thebinaries slightly smaller.The "combined" maps work the same as before, with binary search. They aremuch smaller than the main tables, so it doesn't matter so much. However,the "combined" maps are now stored in the same .map files as the maintables. This seems more clear, since they're always used together, andgenerated from the same source files.Patch by Kyotaro Horiguchi, with lot of hacking by me at various stages.Reviewed by Michael Paquier and Daniel Gustafsson.Discussion:https://www.postgresql.org/message-id/20170306.171609.204324917.horiguchi.kyotaro%40lab.ntt.co.jp1 parent8489269 commitaeed17d
File tree
111 files changed
+147742
-367346
lines changed- src
- backend/utils/mb
- Unicode
- conversion_procs
- utf8_and_big5
- utf8_and_cyrillic
- utf8_and_euc2004
- utf8_and_euc_cn
- utf8_and_euc_jp
- utf8_and_euc_kr
- utf8_and_euc_tw
- utf8_and_gb18030
- utf8_and_gbk
- utf8_and_iso8859
- utf8_and_johab
- utf8_and_sjis
- utf8_and_sjis2004
- utf8_and_uhc
- utf8_and_win
- include/mb
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
111 files changed
+147742
-367346
lines changedLines changed: 4 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
| 55 | + | |
| 56 | + | |
59 | 57 |
| |
60 | 58 |
| |
61 | 59 |
| |
| |||
104 | 102 |
| |
105 | 103 |
| |
106 | 104 |
| |
107 |
| - | |
| 105 | + | |
108 | 106 |
| |
109 | 107 |
| |
110 |
| - | |
| 108 | + | |
111 | 109 |
| |
112 | 110 |
| |
113 | 111 |
| |
|
Lines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 |
| |
30 | 32 |
| |
31 | 33 |
| |
| |||
47 | 49 |
| |
48 | 50 |
| |
49 | 51 |
| |
50 |
| - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 |
| |
52 | 56 |
| |
53 | 57 |
| |
| |||
60 | 64 |
| |
61 | 65 |
| |
62 | 66 |
| |
63 |
| - | |
| 67 | + | |
64 | 68 |
| |
65 | 69 |
| |
66 | 70 |
| |
67 | 71 |
| |
68 |
| - | |
| 72 | + |
Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 |
| |
19 | 21 |
| |
20 | 22 |
| |
| |||
68 | 70 |
| |
69 | 71 |
| |
70 | 72 |
| |
71 |
| - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 |
| |
73 | 77 |
| |
74 | 78 |
| |
75 | 79 |
| |
76 |
| - | |
| 80 | + |
Lines changed: 16 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
| |||
29 | 31 |
| |
30 | 32 |
| |
31 | 33 |
| |
32 |
| - | |
| 34 | + | |
33 | 35 |
| |
34 | 36 |
| |
35 | 37 |
| |
36 |
| - | |
37 |
| - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 |
| |
39 | 43 |
| |
40 | 44 |
| |
| |||
45 | 49 |
| |
46 | 50 |
| |
47 | 51 |
| |
48 |
| - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
49 | 59 |
| |
50 | 60 |
| |
51 | 61 |
| |
52 | 62 |
| |
53 |
| - | |
| 63 | + |
Lines changed: 96 additions & 93 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 |
| |
22 | 24 |
| |
23 | 25 |
| |
| |||
29 | 31 |
| |
30 | 32 |
| |
31 | 33 |
| |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 |
| |
37 | 39 |
| |
38 |
| - | |
| 40 | + |
Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
| |||
54 | 56 |
| |
55 | 57 |
| |
56 | 58 |
| |
57 |
| - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 |
| |
59 | 63 |
| |
60 | 64 |
| |
61 | 65 |
| |
62 | 66 |
| |
63 | 67 |
| |
64 |
| - | |
| 68 | + |
Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 |
| |
19 | 21 |
| |
20 | 22 |
| |
| |||
36 | 38 |
| |
37 | 39 |
| |
38 | 40 |
| |
39 |
| - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
40 | 44 |
| |
41 | 45 |
| |
42 | 46 |
| |
43 | 47 |
| |
44 | 48 |
| |
45 |
| - | |
| 49 | + |
Lines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 |
| |
21 | 23 |
| |
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
25 | 27 |
| |
26 | 28 |
| |
27 |
| - | |
28 |
| - | |
29 |
| - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 |
| |
31 | 33 |
| |
32 |
| - | |
| 34 | + |
Lines changed: 13 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
| 16 | + | |
15 | 17 |
| |
16 | 18 |
| |
17 | 19 |
| |
| |||
34 | 36 |
| |
35 | 37 |
| |
36 | 38 |
| |
37 |
| - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 |
| |
39 |
| - | |
40 | 43 |
| |
41 | 44 |
| |
42 | 45 |
| |
| |||
52 | 55 |
| |
53 | 56 |
| |
54 | 57 |
| |
55 |
| - | |
| 58 | + | |
56 | 59 |
| |
57 | 60 |
| |
58 | 61 |
| |
59 |
| - | |
| 62 | + | |
60 | 63 |
| |
61 | 64 |
| |
62 | 65 |
| |
63 |
| - | |
| 66 | + | |
64 | 67 |
| |
65 | 68 |
| |
66 | 69 |
| |
67 | 70 |
| |
68 | 71 |
| |
69 | 72 |
| |
70 |
| - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
71 | 76 |
| |
72 | 77 |
| |
73 | 78 |
| |
74 | 79 |
| |
75 | 80 |
| |
76 |
| - | |
| 81 | + |
Lines changed: 17 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 |
| |
18 | 20 |
| |
19 | 21 |
| |
| |||
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
25 |
| - | |
| 27 | + | |
26 | 28 |
| |
27 | 29 |
| |
28 | 30 |
| |
29 | 31 |
| |
30 | 32 |
| |
31 | 33 |
| |
32 |
| - | |
| 34 | + | |
33 | 35 |
| |
34 | 36 |
| |
35 | 37 |
| |
36 | 38 |
| |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 |
| - | |
46 |
| - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 |
| |
48 |
| - | |
| 50 | + |
Lines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 |
| |
19 | 21 |
| |
20 | 22 |
| |
| |||
39 | 41 |
| |
40 | 42 |
| |
41 | 43 |
| |
42 |
| - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 |
| |
44 | 48 |
| |
45 | 49 |
| |
46 | 50 |
| |
47 | 51 |
| |
48 | 52 |
| |
49 |
| - | |
| 53 | + | |
50 | 54 |
| |
51 |
| - | |
| 55 | + |
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 |
| |
21 | 23 |
| |
22 | 24 |
| |
| |||
54 | 56 |
| |
55 | 57 |
| |
56 | 58 |
| |
57 |
| - | |
| 59 | + | |
58 | 60 |
|
0 commit comments
Comments
(0)