On Mon, 2 Dec 2002, Joel Burton wrote:
> joel(at)joel=# select round('2.000'::numeric);
> round
> -------
> 2
> (1 row)
>
> joel(at)joel=# select round('2.000'::numeric,2);
> round
> -------
> 2.00
> (1 row)
OK, but:
template1=# select round('2.001'::numeric);
round
-------
2
(1 row)
template1=# select round('2.001'::numeric,2);
round
-------
2.00
(1 row)
The good idea (in 7.2):
template1=# select text('2.000'::numeric);
text
------
2
(1 row)
template1=# select text('2.001'::numeric);
text
-------
2.001
(1 row)
This feature is missing from 7.3..
(new round function is good idea (e.g. fround(numeric))
-Sygma