Re: TO_CHAR and Separate thousand

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: TO_CHAR and Separate thousand
Дата
Msg-id 200511032011.jA3KBYM20338@candle.pha.pa.us
обсуждение исходный текст
Ответ на TO_CHAR and Separate thousand  (Paulo Cuellas <paulo@ibiz.com.br>)
Список pgsql-committers
Paulo Cuellas wrote:
> Hi People,
>
>     Someone can say if its possible use TO_CHAR to define point "." like
> separate thousands ?
>
>     Thank you so much for any help.

Sure, our documentation has a few examples:

    to_char(148.5, '999D999')    ' 148,500'
    to_char(3148.5, '9G999D999')    ' 3 148,500'

Here, the locale has the thousands separator as space.  I am assuming
your locale is set up with the thousands marker as period.  Are you
asking for the period as the thousands separator even though your locale
isn't set that way?

PostgreSQL 8.1 RC1 also has psql '\pset numericlocale' which outputs all
numerics in locale-specific format, but again that is going to be all
driven by locale.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: am@pgfoundry.org (User Am)
Дата:
Сообщение: press - pr: Set the release date to 9 nov.
Следующее
От: nickg@pgfoundry.org (User Nickg)
Дата:
Сообщение: press - pr: Markup corrctions according to W3C validator issues.