Re: to_char(0,'FM999.99') outputs 0.
От | Bruce Momjian |
---|---|
Тема | Re: to_char(0,'FM999.99') outputs 0. |
Дата | |
Msg-id | 200209031701.g83H1Qu23014@candle.pha.pa.us обсуждение исходный текст |
Ответ на | to_char(0,'FM999.99') outputs 0. (sav@tut.by (Andrew)) |
Ответы |
Re: to_char(0,'FM999.99') outputs 0.
|
Список | pgsql-general |
I can see no reason that there is a period after 0 but not after 1. Sure looks like a bug to me. Added to TODO: * to_char(0,'FM999.99') returns a period, to_char(1,'FM999.99') does not --------------------------------------------------------------------------- Andrew wrote: > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- 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-general по дате отправления: