| От | Euler Taveira de Oliveira |
|---|---|
| Тема | wrong behavior using to_char() |
| Дата | |
| Msg-id | 3152.200.178.249.132.1158263640.squirrel@timbira.com обсуждение исходный текст |
| Ответы |
Re: wrong behavior using to_char()
Re: wrong behavior using to_char() |
| Список | pgsql-bugs |
Hi,
I notice a strange behavior using to_char() function. I'm using locale
pt_BR but it could happen with any locale.
template1=# select to_char(12345.67, '999G999D999');
to_char
--------------
12,345,670
(1 registro)
In the pt_BR locale, the thousand separator is "". So it should return
12345,670. Looking at the source, I saw that the test cases for locale
properties are independent among them. I think that the correct form is to
have all-or-nothing test case or didn't test *lconv->property ("" is
evaluated to false). Attached is a patch that fixes it using the second
option.
--
Euler Taveira de Oliveira
http://www.timbira.com/
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера