Skip to content

Commit cabf5d8

Browse files
committed
Improve documentation on the range of the numeric data type.
Gianni Ciolli, reviewed by Noah Misch
1 parent 1981fb7 commit cabf5d8

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,13 @@
346346
<entry><type>decimal</></entry>
347347
<entry>variable</entry>
348348
<entry>user-specified precision, exact</entry>
349-
<entry>no limit</entry>
349+
<entry>up to 131072 digits before the decimal point; up to 16383 digits after the decimal point</entry>
350350
</row>
351351
<row>
352352
<entry><type>numeric</></entry>
353353
<entry>variable</entry>
354354
<entry>user-specified precision, exact</entry>
355-
<entry>no limit</entry>
355+
<entry>up to 131072 digits before the decimal point; up to 16383 digits after the decimal point</entry>
356356
</row>
357357

358358
<row>
@@ -476,8 +476,8 @@
476476
</indexterm>
477477

478478
<para>
479-
The type <type>numeric</type> can store numbers with up to 1000
480-
digits of precision and perform calculations exactly. It is
479+
The type <type>numeric</type> can store numbers with a
480+
very large number of digits and perform calculations exactly. It is
481481
especially recommended for storing monetary amounts and other
482482
quantities where exactness is required. However, arithmetic on
483483
<type>numeric</type> values is very slow compared to the integer
@@ -525,6 +525,15 @@ NUMERIC
525525
explicitly.)
526526
</para>
527527

528+
<note>
529+
<para>
530+
The maximum allowed precision when explicitely specified in the
531+
type declaration is 1000; otherwise the current implementation
532+
of the <type>NUMERIC</type> is subject to the limits described
533+
in <xref linkend="datatype-numeric-table">.
534+
</para>
535+
</note>
536+
528537
<para>
529538
If the scale of a value to be stored is greater than the declared
530539
scale of the column, the system will round the value to the specified

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy