Re: Rounding in PGSQL

Поиск
Список
Период
Сортировка
От Mike Nolan
Тема Re: Rounding in PGSQL
Дата
Msg-id 200408071500.i77F0C8V030115@gw.tssi.com
обсуждение исходный текст
Ответ на Rounding in PGSQL  (Jiri Nemec <konference@menea.cz>)
Список pgsql-general
> Is there some possibility how to write own PGSQL function which I pass in
> price, function selects correct value from "rounding" column and
> return rounded value?

It's unclear whether you want to store the value in its original form
or in its rounded form.

If the latter, what you need is an 'on insert or update' trigger which
passes the value being inserted or updated through your rounding
function and stores the rounded value.
--
Mike Nolan

В списке pgsql-general по дате отправления:

Предыдущее
От: Jiri Nemec
Дата:
Сообщение: Rounding in PGSQL
Следующее
От: Paul Tillotson
Дата:
Сообщение: Re: FW: Out of swap space & memory