to_char(0,'FM999.99') outputs 0.

Поиск
Список
Период
Сортировка
От sav@tut.by (Andrew)
Тема to_char(0,'FM999.99') outputs 0.
Дата
Msg-id d2ddb96a.0208290023.f23170c@posting.google.com
обсуждение исходный текст
Ответы Re: to_char(0,'FM999.99') outputs 0.  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
Hi All,
I know this question has already been here but still...

select to_char(1,'FM999.99')
1

select to_char(0,'FM999.99')
0.

and now I want to get rid of that trailing point !
if this bug hasn't been fixed yet, then what is the best workaround?
should I say something like this:

select case when n = 0 then '0' else to_char(n,'FM999.99') end

Good luck!
Andrew Surinov

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

Предыдущее
От:
Дата:
Сообщение: show ?
Следующее
От: Darren Ferguson
Дата:
Сообщение: Re: Why must the function that a trigger calls return