Search Postgresql Archives

Re: Precision of data types and functions

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

 



I wrote:
> No, I think Bruce fixed this recently.  It's just a cosmetic mistake in
> the error message so we didn't back-patch it.

No, strike that, I remember the discussion now.  The pre-8.2 code is
correct on its own terms, which is that it's telling you what size
number you tried to put in:

regression=# select '123123123123123.2'::numeric(12,2);
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^14 for field with precision 12, scale 2.
regression=# select '12123123123123123.2'::numeric(12,2);
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^16 for field with precision 12, scale 2.
regression=# 

Bruce and some other people thought this was confusing, so it's been
changed for 8.2.

			regards, tom lane


[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