- Notifications
You must be signed in to change notification settings - Fork5
Commit95cacd1
committed
Use a non-locale-dependent definition of isspace() in array_in/array_out.
array_in discards unquoted leading and trailing whitespace in array values,while array_out is careful to quote array elements that contain whitespace.This is problematic when the definition of "whitespace" varies betweenlocales: array_in could drop characters that were meant to be part of thevalue. To avoid that, lock down "whitespace" to mean only the traditionalsix ASCII space characters.This change also works around a bug in OS X and some older BSD systems, inwhich isspace() could return true for character fragments in UTF8 locales.(There may be other places in PG where that bug could cause problems, butthis is the only one complained of so far; see recent report from StevenSchlansker.)Back-patch to 9.0, but not further. Given the lack of previous reportsof trouble, changing this behavior in stable branches seems to offermore risk of breaking applications than reward of avoiding problems.1 parentc5d6d5b commit95cacd1
1 file changed
+29
-7
lines changedLines changed: 29 additions & 7 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 |
| |
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
| |||
192 | 193 |
| |
193 | 194 |
| |
194 | 195 |
| |
195 |
| - | |
| 196 | + | |
196 | 197 |
| |
197 | 198 |
| |
198 | 199 |
| |
| |||
265 | 266 |
| |
266 | 267 |
| |
267 | 268 |
| |
268 |
| - | |
| 269 | + | |
269 | 270 |
| |
270 | 271 |
| |
271 | 272 |
| |
| |||
350 | 351 |
| |
351 | 352 |
| |
352 | 353 |
| |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
353 | 375 |
| |
354 | 376 |
| |
355 | 377 |
| |
| |||
534 | 556 |
| |
535 | 557 |
| |
536 | 558 |
| |
537 |
| - | |
| 559 | + | |
538 | 560 |
| |
539 | 561 |
| |
540 | 562 |
| |
| |||
563 | 585 |
| |
564 | 586 |
| |
565 | 587 |
| |
566 |
| - | |
| 588 | + | |
567 | 589 |
| |
568 | 590 |
| |
569 | 591 |
| |
| |||
756 | 778 |
| |
757 | 779 |
| |
758 | 780 |
| |
759 |
| - | |
| 781 | + | |
760 | 782 |
| |
761 | 783 |
| |
762 | 784 |
| |
| |||
1044 | 1066 |
| |
1045 | 1067 |
| |
1046 | 1068 |
| |
1047 |
| - | |
| 1069 | + | |
1048 | 1070 |
| |
1049 | 1071 |
| |
1050 | 1072 |
| |
|
0 commit comments
Comments
(0)