Re: to_char(0,'9999.99') -> ".00"

Поиск
Список
Период
Сортировка
От Phil Endecott
Тема Re: to_char(0,'9999.99') -> ".00"
Дата
Msg-id 41E3D21C.5030201@chezphil.org
обсуждение исходный текст
Ответ на Re: to_char(0,'9999.99') -> ".00"  (Dave Smith <dave.smith@candata.com>)
Список pgsql-general
I asked:
 >>    to_char(0,'9999.99')
 >>
 >>returns    .00 rather than 0.00.

Dave Smith replied:
> to_char(0,'9990.00')
> ?


Thanks Dave, that's embarrassingly obvious...

I note that the examples in the documentation don't have a 0 before the
decimal point, e.g. this one

to_char(148.5, 'FM999.990')    '148.500'

I imagine that in most cases people do want '0.000' rather than '.000',
so perhaps these examples should be changed to, in this case, 990.000.

Regards,

--Phil.


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

Предыдущее
От: "Jason Tesser"
Дата:
Сообщение: views in 8.0
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: views in 8.0