Re: numeric to text (7.3)
| От | Joel Burton |
|---|---|
| Тема | Re: numeric to text (7.3) |
| Дата | |
| Msg-id | 20021202190338.GB13254@temp.joelburton.com обсуждение |
| Ответ на | Re: numeric to text (7.3) (Rod Taylor <rbt@rbt.ca>) |
| Ответы |
Re: numeric to text (7.3)
|
| Список | pgsql-hackers |
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 | joel@joelburton.com | joelburton.com | aim: wjoelburton
Independent Knowledge Management Consultant
В списке pgsql-hackers по дате отправления: