Re: Rounding in PGSQL - Mailing list pgsql-general

From Mike Nolan
Subject Re: Rounding in PGSQL
Date
Msg-id 200408071500.i77F0C8V030115@gw.tssi.com
Whole thread Raw
In response to Rounding in PGSQL  (Jiri Nemec <konference@menea.cz>)
List 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 by date:

Previous
From: Jiri Nemec
Date:
Subject: Rounding in PGSQL
Next
From: Paul Tillotson
Date:
Subject: Re: FW: Out of swap space & memory