-
+
Data Types
Arbitrary Precision Numbers
- zone="datatype-numeric-decimal">
+
+
+
arbitrary precision numbers
+
+
numeric
plus eight bytes overhead.
+
+ not a number
+
+
+
+ numeric (data type)
+
+
In addition to ordinary numeric values, the numeric
type allows the special value NaN>, meaning
the string NaN> is recognized in a case-insensitive manner.
+
+ In most implementations of the not-a-number> concept,
+ NaN> is not considered equal to any other numeric
+ value (including NaN>). In order to allow
+ numeric> values to be sorted and used in tree-based
+ indexes,
PostgreSQL> treats NaN>
+ values as equal, and greater than all non-NaN>
+ values.
+
+
+
The types decimal and numeric are
equivalent. Both types are part of the
SQL
from zero will cause an underflow error.
+
+ double precision
+
+
In addition to ordinary numeric values, the floating-point types
have several special values:
these strings are recognized in a case-insensitive manner.
+
+ IEEE754 specifies that NaN> should not compare equal
+ to any other floating-point value (including NaN>).
+ In order to allow floating-point values to be sorted and used
+ in tree-based indexes,
PostgreSQL> treats
+ NaN> values as equal, and greater than all
+ non-NaN> values.
+
+
+
PostgreSQL also supports the SQL-standard
notations float and