From: | momjian(at)svr1(dot)postgresql(dot)org (Bruce Momjian) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Add item: > * Add NUMERIC division operator that doesn't round? |
Date: | 2005-06-25 01:32:03 |
Message-ID: | 20050625013203.427355294F@svr1.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Add item:
> * Add NUMERIC division operator that doesn't round?
>
> Currently NUMERIC _rounds_ the result to the specified precision.
> This means division can return a result that multiplied by the
> divisor is greater than the dividend, e.g. this returns a value > 10:
>
> SELECT (10::numeric(2,0) / 6::numeric(2,0))::numeric(2,0) * 6;
>
> The positive modulus result returned by NUMERICs might be considered
> inaccurate, in one sense.
>
Modified Files:
--------------
pgsql/doc:
TODO (r1.1573 -> r1.1574)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/TODO.diff?r1=1.1573&r2=1.1574)
pgsql/doc/src/FAQ:
TODO.html (r1.80 -> r1.81)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/FAQ/TODO.html.diff?r1=1.80&r2=1.81)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-06-25 01:32:29 | Re: [COMMITTERS] pgsql: Fix NUMERIC modulus to properly truncate |
Previous Message | User T-ishii | 2005-06-25 00:58:47 | pgpool - pgpool: Version 2.6 |