Re: [PATCHES] to_char(FM9.9) bug fix - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCHES] to_char(FM9.9) bug fix
Date
Msg-id Pine.LNX.4.44.0209202058240.1149-100000@localhost.localdomain
Whole thread Raw
Responses Re: [PATCHES] to_char(FM9.9) bug fix
Re: [PATCHES] to_char(FM9.9) bug fix
List pgsql-hackers
Karel Zak writes:

> test=# select to_char(0,'FM9.9');
>  to_char
> ---------
>  0.
> (1 row)
>
> test=# select to_char(1,'FM9.9');
>  to_char
> ---------
>  1.
> (1 row)

I find this highly bizzare.  The FM modifier means to omit unnecessary
trailing stuff.  There is no reasonable business or scientific custom to
leave a trailing point after a number.

Or perhaps a more pragmatic question is, how would I print a number
without the trailing point?

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: Improving speed of copy
Next
From: Tom Lane
Date:
Subject: Re: Optimizer generates bad plans.