Re: [SQL] avg() on numeric ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wieck(at)debis(dot)com (Jan Wieck)
Cc: kaiq(at)realtyideas(dot)com, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] avg() on numeric ?
Date: 1999-12-18 01:10:37
Message-ID: 29406.945479437@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

wieck(at)debis(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message Mitch Vincent 1999-12-18 03:56:13 count() question
Previous Message Bruce Momjian 1999-12-18 00:32:05 Re: [SQL] Sub-select speed.