forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfb1a188
committed
Remove ts_locale.c's lowerstr()
lowerstr() and lowerstr_with_len() in ts_locale.c do the same thing asstr_tolower() that the rest of the system uses, except that the formerdon't use the common locale provider framework but instead use theglobal libc locale settings.This patch replaces uses of lowerstr*() with str_tolower(...,DEFAULT_COLLATION_OID). For instances that use a libc localeglobally, this will result in exactly the same behavior. Forinstances that use other locale providers, you now get consistentbehavior and are no longer dependent on the libc locale settings (forthis case; there are others).Most uses of these functions are for processing dictionary andconfiguration files. In those cases, using the default collationseems appropriate. At least we don't have a more specific collationavailable. But the code in contrib/pg_trgm should really depend onthe collation of the columns being processed. This is not done here,this can be done in a separate patch.(You can probably construct some edge cases where this change wouldcreate some locale-related upgrade incompatibility, for example ifbefore you used a combination of ICU and a differently-behaving libclocale. We can document this in the release notes, but I don't thinkthere is anything more we can do about this.)Reviewed-by: Jeff Davis <pgsql@j-davis.com>Discussion:https://www.postgresql.org/message-id/flat/653f3b84-fc87-45a7-9a0c-bfb4fcab3e7d%40eisentraut.org1 parentd3aad4a commitfb1a188
File tree
12 files changed
+43
-121
lines changed- contrib
- dict_xsyn
- pg_trgm
- src
- backend
- snowball
- tsearch
- include/tsearch
12 files changed
+43
-121
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| 21 | + | |
20 | 22 |
| |
21 | 23 |
| |
22 | 24 |
| |
| |||
93 | 95 |
| |
94 | 96 |
| |
95 | 97 |
| |
96 |
| - | |
| 98 | + | |
97 | 99 |
| |
98 | 100 |
| |
99 | 101 |
| |
| |||
210 | 212 |
| |
211 | 213 |
| |
212 | 214 |
| |
213 |
| - | |
| 215 | + | |
214 | 216 |
| |
215 | 217 |
| |
216 | 218 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
| 15 | + | |
14 | 16 |
| |
15 | 17 |
| |
16 | 18 |
| |
| |||
303 | 305 |
| |
304 | 306 |
| |
305 | 307 |
| |
306 |
| - | |
| 308 | + | |
307 | 309 |
| |
308 | 310 |
| |
309 | 311 |
| |
| |||
899 | 901 |
| |
900 | 902 |
| |
901 | 903 |
| |
902 |
| - | |
| 904 | + | |
903 | 905 |
| |
904 | 906 |
| |
905 | 907 |
| |
|
Lines changed: 9 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
191 | 191 |
| |
192 | 192 |
| |
193 | 193 |
| |
| 194 | + | |
194 | 195 |
| |
195 | 196 |
| |
196 | 197 |
| |
| 198 | + | |
197 | 199 |
| |
198 | 200 |
| |
199 | 201 |
| |
| |||
847 | 849 |
| |
848 | 850 |
| |
849 | 851 |
| |
850 |
| - | |
851 |
| - | |
852 |
| - | |
853 |
| - | |
854 |
| - | |
855 |
| - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
856 | 858 |
| |
857 | 859 |
| |
858 | 860 |
| |
859 |
| - | |
| 861 | + | |
860 | 862 |
| |
861 | 863 |
| |
862 | 864 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
16 |
| - | |
| 17 | + | |
17 | 18 |
| |
| 19 | + | |
18 | 20 |
| |
19 | 21 |
| |
20 | 22 |
| |
| |||
236 | 238 |
| |
237 | 239 |
| |
238 | 240 |
| |
239 |
| - | |
| 241 | + | |
240 | 242 |
| |
241 | 243 |
| |
242 | 244 |
| |
| |||
272 | 274 |
| |
273 | 275 |
| |
274 | 276 |
| |
275 |
| - | |
| 277 | + | |
276 | 278 |
| |
277 | 279 |
| |
278 | 280 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
16 | 17 |
| |
17 | 18 |
| |
18 |
| - | |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
75 |
| - | |
| 76 | + | |
76 | 77 |
| |
77 | 78 |
| |
78 | 79 |
| |
| |||
121 | 122 |
| |
122 | 123 |
| |
123 | 124 |
| |
124 |
| - | |
| 125 | + | |
125 | 126 |
| |
126 | 127 |
| |
127 | 128 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
16 | 17 |
| |
17 |
| - | |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
47 | 48 |
| |
48 | 49 |
| |
49 | 50 |
| |
50 |
| - | |
| 51 | + | |
51 | 52 |
| |
52 | 53 |
| |
53 | 54 |
| |
| |||
80 | 81 |
| |
81 | 82 |
| |
82 | 83 |
| |
83 |
| - | |
| 84 | + | |
84 | 85 |
| |
85 | 86 |
| |
86 | 87 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
16 | 17 |
| |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| 21 | + | |
20 | 22 |
| |
21 | 23 |
| |
22 | 24 |
| |
| |||
183 | 185 |
| |
184 | 186 |
| |
185 | 187 |
| |
186 |
| - | |
187 |
| - | |
| 188 | + | |
| 189 | + | |
188 | 190 |
| |
189 | 191 |
| |
190 | 192 |
| |
| |||
223 | 225 |
| |
224 | 226 |
| |
225 | 227 |
| |
226 |
| - | |
| 228 | + | |
227 | 229 |
| |
228 | 230 |
| |
229 | 231 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
| 69 | + | |
69 | 70 |
| |
70 | 71 |
| |
71 | 72 |
| |
| |||
169 | 170 |
| |
170 | 171 |
| |
171 | 172 |
| |
172 |
| - | |
| 173 | + | |
173 | 174 |
| |
174 | 175 |
| |
175 | 176 |
| |
| |||
178 | 179 |
| |
179 | 180 |
| |
180 | 181 |
| |
181 |
| - | |
| 182 | + | |
182 | 183 |
| |
183 | 184 |
| |
184 | 185 |
| |
| |||
1449 | 1450 |
| |
1450 | 1451 |
| |
1451 | 1452 |
| |
1452 |
| - | |
| 1453 | + | |
1453 | 1454 |
| |
1454 | 1455 |
| |
1455 | 1456 |
| |
|
Lines changed: 0 additions & 89 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
270 |
| - | |
271 |
| - | |
272 |
| - | |
273 |
| - | |
274 |
| - | |
275 |
| - | |
276 |
| - | |
277 |
| - | |
278 |
| - | |
279 |
| - | |
280 |
| - | |
281 |
| - | |
282 |
| - | |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 |
| - | |
287 |
| - | |
288 |
| - |
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
| |||
65 | 66 |
| |
66 | 67 |
| |
67 | 68 |
| |
68 |
| - | |
| 69 | + | |
69 | 70 |
| |
70 | 71 |
| |
71 | 72 |
| |
| |||
115 | 116 |
| |
116 | 117 |
| |
117 | 118 |
| |
118 |
| - | |
| 119 | + | |
119 | 120 |
| |
120 | 121 |
| |
121 | 122 |
| |
|
Lines changed: 0 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 | 45 |
| |
49 | 46 |
| |
50 | 47 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
| 107 | + | |
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
|
0 commit comments
Comments
(0)