aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-03-12 00:25:43 +0000
committerNeil Conway <neilc@samurai.com>2004-03-12 00:25:43 +0000
commitbfd6f52b0e0f1c1d579bf385dedfebca229dfcf5 (patch)
treed93225b282bd93d404205aaa8138ce262ae4cbdc /doc/src
parentfe6e9221360116e440fc28e45b083eb0811682cd (diff)
downloadpostgresql-bfd6f52b0e0f1c1d579bf385dedfebca229dfcf5.tar.gz
postgresql-bfd6f52b0e0f1c1d579bf385dedfebca229dfcf5.zip
Allow 'Infinity' and '-Infinity' as input to the float4 and float8
types. Update the regression tests and the documentation to reflect this. Remove the UNSAFE_FLOATS #ifdef. This is only half the story: we still unconditionally reject floating point operations that result in +/- infinity. See recent thread on -hackers for more information.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/syntax.sgml19
1 files changed, 18 insertions, 1 deletions
diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml
index 5f82a784851..c6093b84637 100644
--- a/doc/src/sgml/syntax.sgml
+++ b/doc/src/sgml/syntax.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.89 2003/11/29 19:51:37 pgsql Exp $
+$PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.90 2004/03/12 00:25:40 neilc Exp $
-->
<chapter id="sql-syntax">
@@ -360,6 +360,23 @@ SELECT 'foo' 'bar';
</para>
<para>
+ In addition, there are several special constant values that are
+ accepted as numeric constants. The <type>float4</type> and
+ <type>float8</type> types allow the following special constants:
+<literallayout>
+Infinity
+-Infinity
+NaN
+</literallayout>
+ These represent the IEEE 754 special values
+ <quote>infinity</quote>, <quote>negative infinity</quote>, and
+ <quote>not-a-number</quote>, respectively. The
+ <type>numeric</type> type only allows <literal>NaN</>, whereas
+ the integral types do not allow any of these constants. Note that
+ these constants are recognized in a case-insensitive manner.
+ </para>
+
+ <para>
<indexterm><primary>integer</primary></indexterm>
<indexterm><primary>bigint</primary></indexterm>
<indexterm><primary>numeric</primary></indexterm>