BUG #6277: Money datatype conversion wrong with Russian locale

Поиск
Список
Период
Сортировка
От Alexander LAW
Тема BUG #6277: Money datatype conversion wrong with Russian locale
Дата
Msg-id 201110291210.p9TCAHBA041757@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #6277: Money datatype conversion wrong with Russian locale  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      6277
Logged by:          Alexander LAW
Email address:      exclusion@gmail.com
PostgreSQL version: 9.1.1
Operating system:   Windows
Description:        Money datatype conversion wrong with Russian locale
Details:

When lc_monetary is set to Russian, money values having 4+ digits formatted
incorrectly.
E.g. following select:

set lc_monetary='Russian';
select '1000'::money;

returns a string that can't be displayed.
It's caused by wrong mon_thousands_sep processing in
backend/utils/adt/cash.c, cash_out function.
The code assumes that the thousands separator fits in one character. But in
Russian locale we have non-breakable space as the thousands separator (0xC2
0xA0 in UTF-8).
The cash_out function uses only the first char (0xC2) of it and thus returns
an invalid string: 1\xC2000.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alex Hunsaker
Дата:
Сообщение: Re: plperl no longer provides string representations of composite values
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6277: Money datatype conversion wrong with Russian locale