Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 32CEA9FACFE for ; Sun, 21 Jan 2007 14:49:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 72006-02 for ; Sun, 21 Jan 2007 14:49:50 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 8251C9FA66C for ; Sun, 21 Jan 2007 14:49:49 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l0LInlnu028243; Sun, 21 Jan 2007 13:49:47 -0500 (EST) To: "Ezequias Rodrigues da Rocha" cc: pgsql-sql@postgresql.org Subject: Re: Changing point for commas and commas for point In-reply-to: <55c095e90701211041t40c9bb5br91c94ad1d9b37a7c@mail.gmail.com> References: <55c095e90701211041t40c9bb5br91c94ad1d9b37a7c@mail.gmail.com> Comments: In-reply-to "Ezequias Rodrigues da Rocha" message dated "Sun, 21 Jan 2007 16:41:15 -0200" Date: Sun, 21 Jan 2007 13:49:47 -0500 Message-ID: <28242.1169405387@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/92 X-Sequence-Number: 27244 "Ezequias Rodrigues da Rocha" writes: > Here in my country (Brazil) we have the decimal simbol as ' , ' (commas) and > thousand separator as ' . ' (point) > Here my sql uses: to_char(sum(My_column), '99990D00') That's the right thing. > Is there any way to make this happens ? I think you forgot to set LC_NUMERIC. regression=# select to_char(42.45, '99990D00'); to_char ----------- 42.45 (1 row) regression=# set lc_numeric TO 'pt_PT.iso88591'; SET regression=# select to_char(42.45, '99990D00'); to_char ----------- 42,45 (1 row) The specific locale names available vary across OSes ... try "locale -a" for a list. regards, tom lane