Search Postgresql Archives

Re: numeric field overflow

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

 




On Oct 5, 2009, at 11:20 PM, Nurzhan Kirbassov wrote:
So, does the precision part of the numeric type really means number of
digits to the left of the decimal point, or what ?


NUMERIC is behaving as documented. The way to think of it is when you are inserting:

	INSERT INTO test.test VALUES (10000)

into a NUMERIC(5,1), what you are doing is inserting:

	INSERT INTO test.test VALUES (10000.0)

10000.0 has six significant digits, rather than five, so the insert fails.
--
-- Christophe Pettus
   xof@xxxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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