- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit71763ec
committed
Further fix for psql's code for locale-aware formatting of numeric output.
On closer inspection, those seemingly redundant atoi() calls were not somuch inefficient as just plain wrong: the author of this code either hadnot read, or had not understood, the POSIX specification for localeconv().The grouping field is *not* a textual digit string but separate integersencoded as chars.We'll follow the existing code as well as the backend's cash.c in onlyhonoring the first group width, but let's at least honor it correctly.This doesn't actually result in any behavioral change in any of thelocales I have installed on my Linux box, which may explain why nobody'scomplained; grouping width 3 is close enough to universal that it's barelyworth considering other cases. Still, wrong is wrong, so back-patch.1 parentc2d6ef1 commit71763ec
1 file changed
+11
-3
lines changedLines changed: 11 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2455 | 2455 |
| |
2456 | 2456 |
| |
2457 | 2457 |
| |
| 2458 | + | |
2458 | 2459 |
| |
2459 | 2460 |
| |
2460 | 2461 |
| |
2461 | 2462 |
| |
2462 | 2463 |
| |
2463 |
| - | |
2464 |
| - | |
2465 |
| - | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
2466 | 2473 |
| |
2467 | 2474 |
| |
| 2475 | + | |
2468 | 2476 |
| |
2469 | 2477 |
| |
2470 | 2478 |
| |
|
0 commit comments
Comments
(0)