Re: [SQL] avg() on numeric ? - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] avg() on numeric ?
Date
Msg-id 29406.945479437@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] avg() on numeric ?  (wieck@debis.com (Jan Wieck))
List pgsql-sql
wieck@debis.com (Jan Wieck) writes:
>     Looks  to  me  there's something wrong with the adjustment of
>     actual computation and/or  display  precision  during  longer
>     taking aggregates.  I know where to look at - tnx anyway.

It doesn't necessarily take long; Zot O'Connor posted this example
in late October:

create table example(other      decimal(4,4));
CREATE

insert into example         (other) values(3.9);
ERROR:  overflow on numeric ABS(value) >= 10^0 for field with precision 4 scale 4
insert into example         (other) values(0.0);
ERROR:  overflow on numeric ABS(value) >= 10^0 for field with precision 4 scale 4

which still fails in current sources.
        regards, tom lane


pgsql-sql by date:

Previous
From: admin
Date:
Subject: indices on join
Next
From: admin
Date:
Subject: can't join with indices