Re: [HACKERS] bug in 6.5.3...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Don Baccus <dhogaza(at)pacifier(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] bug in 6.5.3...
Date: 2000-01-12 06:33:01
Message-ID: 9038.947658781@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Don Baccus <dhogaza(at)pacifier(dot)com> writes:
> I looked in the "TODO" list and didn't find any mention of
> avg() or relevant items regarding aggregates so here's my
> bug du jour:

> acs=> create table foo(p numeric(9,2));
> CREATE
> acs=> select avg(p) from foo;
> ERROR: overflow on numeric ABS(value) >= 10^-1 for field with precision 0
> scale 1723
> acs=>
> acs=> insert into foo values(3);
> INSERT 1014409 1
> acs=> select avg(p) from foo;
> ERROR: overflow on numeric ABS(value) >= 10^-1 for field with precision 0
> scale 1723

That's a known bug I believe (Jan, are you paying attention?). It seems
to be platform-dependent --- in current sources, I see no failure on an
HPUX box, but a Linux box fails with
ERROR: overflow on numeric ABS(value) >= 10^-1 for field with precision 2077 scale 22808
Maybe a big-vs-little-endian kind of problem?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-01-12 06:42:56 Re: [HACKERS] psql -f inconsistency with "copy from stdin"
Previous Message Tom Lane 2000-01-12 06:22:33 Re: [HACKERS] Re: Regress tests reveal *serious* psql bug