forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd3aad4a
committed
Remove ts_locale.c's t_isdigit(), t_isspace(), t_isprint()
These do the same thing as the standard isdigit(), isspace(), andisprint() but with multibyte and encoding support. But all thecallers are only interested in analyzing single-byte ASCII characters.So this extra layer is overkill and we can replace the uses with thestandard functions.All the t_is*() functions in ts_locale.c are under scrutiny becausethey don't use the common locale provider framework but instead usethe global libc locale settings. For the functions being touched bythis patch, we don't need all that anyway, as mentioned above, so thesimplest solution is to just remove them. The few remaining t_is*()functions will need a different treatment in a separate patch.pg_trgm has some compile-time options with macros such asKEEPONLYALNUM. These are not documented, and the non-default variantis not supported by any test cases. As part of this undertaking, I'mremoving the non-default variant, as it is in the way of cleanup. Soin this case, the not-KEEPONLYALNUM code path is gone.Reviewed-by: Jeff Davis <pgsql@j-davis.com>Discussion:https://www.postgresql.org/message-id/flat/653f3b84-fc87-45a7-9a0c-bfb4fcab3e7d%40eisentraut.org1 parent60be3f9 commitd3aad4a
File tree
13 files changed
+49
-103
lines changed- contrib
- dict_xsyn
- ltree
- pg_trgm
- unaccent
- src
- backend
- tsearch
- utils/adt
- include/tsearch
13 files changed
+49
-103
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 |
| - | |
| 58 | + | |
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
411 | 411 |
| |
412 | 412 |
| |
413 | 413 |
| |
414 |
| - | |
| 414 | + | |
415 | 415 |
| |
416 | 416 |
| |
417 | 417 |
| |
| |||
429 | 429 |
| |
430 | 430 |
| |
431 | 431 |
| |
432 |
| - | |
| 432 | + | |
433 | 433 |
| |
434 | 434 |
| |
435 | 435 |
| |
| |||
460 | 460 |
| |
461 | 461 |
| |
462 | 462 |
| |
463 |
| - | |
| 463 | + | |
464 | 464 |
| |
465 | 465 |
| |
466 | 466 |
| |
| |||
471 | 471 |
| |
472 | 472 |
| |
473 | 473 |
| |
474 |
| - | |
| 474 | + | |
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
91 |
| - | |
| 91 | + | |
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
|
Lines changed: 0 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
19 | 18 |
| |
20 | 19 |
| |
21 | 20 |
| |
| |||
51 | 50 |
| |
52 | 51 |
| |
53 | 52 |
| |
54 |
| - | |
55 | 53 |
| |
56 | 54 |
| |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 | 55 |
| |
62 | 56 |
| |
63 | 57 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
158 |
| - | |
| 158 | + | |
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
| 50 | + | |
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
63 |
| - | |
| 63 | + | |
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 |
| - | |
| 193 | + | |
194 | 194 |
| |
195 | 195 |
| |
196 | 196 |
| |
| |||
212 | 212 |
| |
213 | 213 |
| |
214 | 214 |
| |
215 |
| - | |
| 215 | + | |
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
| |||
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
228 |
| - | |
| 228 | + | |
229 | 229 |
| |
230 | 230 |
| |
231 | 231 |
| |
| |||
245 | 245 |
| |
246 | 246 |
| |
247 | 247 |
| |
248 |
| - | |
| 248 | + | |
249 | 249 |
| |
250 | 250 |
| |
251 | 251 |
| |
| |||
254 | 254 |
| |
255 | 255 |
| |
256 | 256 |
| |
257 |
| - | |
| 257 | + | |
258 | 258 |
| |
259 | 259 |
| |
260 | 260 |
| |
|
Lines changed: 22 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
390 | 390 |
| |
391 | 391 |
| |
392 | 392 |
| |
393 |
| - | |
| 393 | + | |
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
| |||
408 | 408 |
| |
409 | 409 |
| |
410 | 410 |
| |
411 |
| - | |
| 411 | + | |
412 | 412 |
| |
413 | 413 |
| |
414 | 414 |
| |
| |||
542 | 542 |
| |
543 | 543 |
| |
544 | 544 |
| |
545 |
| - | |
| 545 | + | |
546 | 546 |
| |
547 | 547 |
| |
548 | 548 |
| |
| |||
558 | 558 |
| |
559 | 559 |
| |
560 | 560 |
| |
561 |
| - | |
| 561 | + | |
562 | 562 |
| |
563 | 563 |
| |
564 | 564 |
| |
| |||
799 | 799 |
| |
800 | 800 |
| |
801 | 801 |
| |
802 |
| - | |
| 802 | + | |
803 | 803 |
| |
804 | 804 |
| |
805 | 805 |
| |
| |||
814 | 814 |
| |
815 | 815 |
| |
816 | 816 |
| |
817 |
| - | |
| 817 | + | |
818 | 818 |
| |
819 | 819 |
| |
820 | 820 |
| |
| |||
925 | 925 |
| |
926 | 926 |
| |
927 | 927 |
| |
928 |
| - | |
| 928 | + | |
929 | 929 |
| |
930 | 930 |
| |
931 | 931 |
| |
| |||
939 | 939 |
| |
940 | 940 |
| |
941 | 941 |
| |
942 |
| - | |
| 942 | + | |
943 | 943 |
| |
944 | 944 |
| |
945 | 945 |
| |
| |||
957 | 957 |
| |
958 | 958 |
| |
959 | 959 |
| |
960 |
| - | |
| 960 | + | |
961 | 961 |
| |
962 | 962 |
| |
963 | 963 |
| |
| |||
974 | 974 |
| |
975 | 975 |
| |
976 | 976 |
| |
977 |
| - | |
| 977 | + | |
978 | 978 |
| |
979 | 979 |
| |
980 | 980 |
| |
| |||
991 | 991 |
| |
992 | 992 |
| |
993 | 993 |
| |
994 |
| - | |
| 994 | + | |
995 | 995 |
| |
996 | 996 |
| |
997 | 997 |
| |
| |||
1008 | 1008 |
| |
1009 | 1009 |
| |
1010 | 1010 |
| |
1011 |
| - | |
| 1011 | + | |
1012 | 1012 |
| |
1013 | 1013 |
| |
1014 | 1014 |
| |
| |||
1070 | 1070 |
| |
1071 | 1071 |
| |
1072 | 1072 |
| |
1073 |
| - | |
| 1073 | + | |
1074 | 1074 |
| |
1075 | 1075 |
| |
1076 | 1076 |
| |
| |||
1080 | 1080 |
| |
1081 | 1081 |
| |
1082 | 1082 |
| |
1083 |
| - | |
| 1083 | + | |
1084 | 1084 |
| |
1085 | 1085 |
| |
1086 | 1086 |
| |
| |||
1225 | 1225 |
| |
1226 | 1226 |
| |
1227 | 1227 |
| |
1228 |
| - | |
| 1228 | + | |
1229 | 1229 |
| |
1230 | 1230 |
| |
1231 | 1231 |
| |
| |||
1262 | 1262 |
| |
1263 | 1263 |
| |
1264 | 1264 |
| |
1265 |
| - | |
| 1265 | + | |
1266 | 1266 |
| |
1267 | 1267 |
| |
1268 | 1268 |
| |
| |||
1298 | 1298 |
| |
1299 | 1299 |
| |
1300 | 1300 |
| |
1301 |
| - | |
| 1301 | + | |
1302 | 1302 |
| |
1303 | 1303 |
| |
1304 | 1304 |
| |
| |||
1461 | 1461 |
| |
1462 | 1462 |
| |
1463 | 1463 |
| |
1464 |
| - | |
| 1464 | + | |
1465 | 1465 |
| |
1466 |
| - | |
| 1466 | + | |
1467 | 1467 |
| |
1468 | 1468 |
| |
1469 | 1469 |
| |
| |||
1494 | 1494 |
| |
1495 | 1495 |
| |
1496 | 1496 |
| |
1497 |
| - | |
| 1497 | + | |
1498 | 1498 |
| |
1499 | 1499 |
| |
1500 | 1500 |
| |
| |||
1523 | 1523 |
| |
1524 | 1524 |
| |
1525 | 1525 |
| |
1526 |
| - | |
| 1526 | + | |
1527 | 1527 |
| |
1528 | 1528 |
| |
1529 | 1529 |
| |
| |||
1750 | 1750 |
| |
1751 | 1751 |
| |
1752 | 1752 |
| |
1753 |
| - | |
| 1753 | + | |
1754 | 1754 |
| |
1755 | 1755 |
| |
1756 | 1756 |
| |
|
0 commit comments
Comments
(0)