Re: numeric to text (7.3)

Поиск
Список
Период
Сортировка
От Szima Gábor
Тема Re: numeric to text (7.3)
Дата
Msg-id Pine.LNX.4.50.0212022010010.753-100000@vigo.sygma.net
обсуждение исходный текст
Ответ на Re: numeric to text (7.3)  (Joel Burton <joel@joelburton.com>)
Список 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 по дате отправления:

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Shrinkwrap Windows Product, any issues? Anyone?
Следующее
От: Szima Gábor
Дата:
Сообщение: Re: numeric to text (7.3)