On Mon, 2 Dec 2002, Rod Taylor wrote:

>  double precision | pg_catalog | round          | double precision
>  numeric          | pg_catalog | round          | numeric
>  numeric          | pg_catalog | round          | numeric, integer
>
> Looks like round still exists to me.

Rod, you don't understand me. :)

I needn't round, or the valueless zeroes too.

It's good (in older version of pSQL):
2.000::numeric -> 2
2.001::numeric -> 2.001


It's "ugly" (in 7.3):
2.000::numeric -> 2.000
2.001::numeric -> 2.001
or
round(2.000::numeric,2) -> 2.00
round(2.001::numeric,2) -> 2.00


Joel had got a good idea:

joel@joel=# select rtrim(rtrim('2.000'::numeric, '0'),'.');
 rtrim
-------
 2
(1 row)

.. but i prefer the old text(numeric) function :)


Thanks!


                                                        -Sygma

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to