Re: numeric to text (7.3)

From: Szima Gábor <sygma(at)tesla(dot)hu>
To: Joel Burton <joel(at)joelburton(dot)com>
Cc: Rod Taylor <rbt(at)rbt(dot)ca>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: numeric to text (7.3)
Date: 2002-12-02 19:23:24
Message-ID: Pine.LNX.4.50.0212022010010.753-100000@vigo.sygma.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-12-02 19:25:24 Re: Croatian language file for 7.3
Previous Message Rod Taylor 2002-12-02 19:08:24 Re: ALTER TABLE schema SCHEMA TO new_schema?