diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-04-03 19:56:22 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-04-03 19:56:22 -0400 |
commit | cabf5d84b6d1a92ab97492d7e3d650548a9992cd (patch) | |
tree | eb79cd4ce23fb6fed493929d74c2334fbb30b14a /doc/src | |
parent | 1981fb73136433579cae9a34fb3a12f1fcc519fc (diff) | |
download | postgresql-cabf5d84b6d1a92ab97492d7e3d650548a9992cd.tar.gz postgresql-cabf5d84b6d1a92ab97492d7e3d650548a9992cd.zip |
Improve documentation on the range of the numeric data type.
Gianni Ciolli, reviewed by Noah Misch
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/datatype.sgml | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 0bb6594eab1..ecc79e27fc3 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -346,13 +346,13 @@ <entry><type>decimal</></entry> <entry>variable</entry> <entry>user-specified precision, exact</entry> - <entry>no limit</entry> + <entry>up to 131072 digits before the decimal point; up to 16383 digits after the decimal point</entry> </row> <row> <entry><type>numeric</></entry> <entry>variable</entry> <entry>user-specified precision, exact</entry> - <entry>no limit</entry> + <entry>up to 131072 digits before the decimal point; up to 16383 digits after the decimal point</entry> </row> <row> @@ -476,8 +476,8 @@ </indexterm> <para> - The type <type>numeric</type> can store numbers with up to 1000 - digits of precision and perform calculations exactly. It is + The type <type>numeric</type> can store numbers with a + very large number of digits and perform calculations exactly. It is especially recommended for storing monetary amounts and other quantities where exactness is required. However, arithmetic on <type>numeric</type> values is very slow compared to the integer @@ -525,6 +525,15 @@ NUMERIC explicitly.) </para> + <note> + <para> + The maximum allowed precision when explicitely specified in the + type declaration is 1000; otherwise the current implementation + of the <type>NUMERIC</type> is subject to the limits described + in <xref linkend="datatype-numeric-table">. + </para> + </note> + <para> If the scale of a value to be stored is greater than the declared scale of the column, the system will round the value to the specified |