Search Postgresql Archives

Re: Different exponent in error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 11, 2006 at 04:09:23PM -0500, Tom Lane wrote:
> "Andrus" <eetasoft@xxxxxxxxx> writes:
> > Why Postgres 8.1.1 in XP returns different exponents ( 10^6, 10^9, 10^7) for 
> > field with precision 9, scale 3 ?
> 
> Could we see a complete test case --- ie, what are the input values
> causing these messages?

I think this is what Andrus is seeing:

test=> CREATE TABLE foo (n numeric(9,3));
CREATE TABLE
test=> INSERT INTO foo VALUES (1000000);
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^6 for field with precision 9, scale 3.
test=> INSERT INTO foo VALUES (1000000000);
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^9 for field with precision 9, scale 3.
test=> INSERT INTO foo VALUES (10000000);
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^7 for field with precision 9, scale 3.

-- 
Michael Fuhr


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux