Numeric Bug? - Mailing list pgsql-sql

From Zot O'Connor
Subject Numeric Bug?
Date
Msg-id 381A2C66.1809CE9F@zotconsulting.com
Whole thread Raw
List pgsql-sql
It appears as though 0.0 has a bigger value?

I am running redhar 6.5.2 rpms (RH6).



DROP
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
insert into example         (other) values(0.1);
INSERT 49645 1
insert into example         (other) values(0.1234);
INSERT 49710 1

I can insert 0.1 but not 0.0?

This cannot be right!  This works for Solid and mysql!

Is there a workaround?
-- 
Zot O'Connor

www.ZotConsulting.com
www.WhiteKnightHackers.com


pgsql-sql by date:

Previous
From: "Zot O'Connor"
Date:
Subject: Decimal precsion?
Next
From: Tom Lane
Date:
Subject: Re: [SQL] trivial problem