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/

Attachment: x
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to