On Mon, Dec 02, 2002 at 01:35:47PM -0500, Rod Taylor wrote:
> > template1=# select text(2.000::numeric);
> >  text
> > -------
> >  2.000
> > (1 row)
> > 
> > The text(numeric) function doesn't round numbers. :(
> > 
> > This is bug or feature? :)
> 
> I'd say feature in that it doesn't reduce the precision of the number.

... and, of course, you can round with:

joel@joel=# select round('2.000'::numeric);
 round
-------
      2
(1 row)

joel@joel=# select round('2.000'::numeric,2);
 round
-------
   2.00
(1 row)
         

-- 

Joel BURTON  |  [EMAIL PROTECTED]  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to