Re: numeric to text (7.3) - Mailing list pgsql-hackers

From Szima Gábor
Subject Re: numeric to text (7.3)
Date
Msg-id Pine.LNX.4.50.0212022010010.753-100000@vigo.sygma.net
Whole thread Raw
In response to Re: numeric to text (7.3)  (Joel Burton <joel@joelburton.com>)
List pgsql-hackers
On Mon, 2 Dec 2002, Joel Burton wrote:

> joel@joel=# select round('2.000'::numeric);
>  round
> -------
>       2
> (1 row)
>
> joel@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


pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Shrinkwrap Windows Product, any issues? Anyone?
Next
From: Szima Gábor
Date:
Subject: Re: numeric to text (7.3)