Re: numeric rounding
От
Alvaro Herrera
Тема
Re: numeric rounding
Дата
Msg-id
20031001141345.GA2528@dcc.uchile.cl
Список
Дерево обсуждения
Re: numeric rounding "James Moe" <jimoe@sohnen-moe.com>
On Tue, Sep 30, 2003 at 06:13:39PM -0700, Gezeala 'Eyah' Bacuño II wrote:
> sorry man, but round function can't be used/doesn't work inside a
> plpgsql function..
Huh?
regression=> create or replace function try_to_round(float) returns float as '
regression'> begin
regression'> return round($1::numeric, 2);
regression'> end;
regression'> ' language plpgsql;
CREATE FUNCTION
regression=> select try_to_round(12.1231231);
try_to_round
--------------
12.12
(1 row)
--
Alvaro Herrera ()
"No hay cielo posible sin hundir nuestras raíces
en la profundidad de la tierra" (Malucha Pinto)
В списке pgsql-general по дате отправления
От: pgsql-ml@baguette.net
Дата:
От: Vivek Khera
Дата: