pgsql: Further fix for psql's code for locale-aware formatting of numer
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Further fix for psql's code for locale-aware formatting of numer |
| Дата | |
| Msg-id | E1ZfKCT-0006k8-62@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Further fix for psql's code for locale-aware formatting of numeric output. On closer inspection, those seemingly redundant atoi() calls were not so much inefficient as just plain wrong: the author of this code either had not read, or had not understood, the POSIX specification for localeconv(). The grouping field is *not* a textual digit string but separate integers encoded as chars. We'll follow the existing code as well as the backend's cash.c in only honoring the first group width, but let's at least honor it correctly. This doesn't actually result in any behavioral change in any of the locales I have installed on my Linux box, which may explain why nobody's complained; grouping width 3 is close enough to universal that it's barely worth considering other cases. Still, wrong is wrong, so back-patch. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/49917edadf9d787efbd71b7e1e689eb48c2a1c47 Modified Files -------------- src/bin/psql/print.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера