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

From: sav(at)tut(dot)by (Andrew)
To: pgsql-general(at)postgresql(dot)org
Subject: to_char(0,'FM999.99') outputs 0.
Date: 2002-08-29 08:23:05
Message-ID: d2ddb96a.0208290023.f23170c@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message jerome 2002-08-29 08:34:14 Re: Postgresql tuning..
Previous Message Michał Kalański 2002-08-29 08:11:45 Fw: psql 7.2.1 on S/390