Index: doc/src/sgml/datatype.sgml =================================================================== RCS file: /home/neilc/postgres/cvs_root/pgsql/doc/src/sgml/datatype.sgml,v retrieving revision 1.183 diff -c -p -r1.183 datatype.sgml *** doc/src/sgml/datatype.sgml 22 Dec 2006 22:09:31 -0000 1.183 --- doc/src/sgml/datatype.sgml 12 Jan 2007 21:52:22 -0000 *************** *** 438,447 **** Arbitrary Precision Numbers ! numeric (data type) decimal numeric --- 438,451 ---- Arbitrary Precision Numbers ! numeric (data type) + + arbitrary precision numbers + + decimal numeric *************** NUMERIC *** 515,520 **** --- 519,529 ---- 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 *************** NUMERIC *** 525,530 **** --- 534,551 ---- 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 *************** NUMERIC *** 613,618 **** --- 634,644 ---- from zero will cause an underflow error. + + not a number + double precision + + In addition to ordinary numeric values, the floating-point types have several special values: *************** NUMERIC *** 631,636 **** --- 657,673 ---- 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