From 2169e42bef9db7e0bdd1bea00b81f44973ad83c8 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Sun, 30 Mar 2008 04:08:15 +0000 Subject: Enable 64-bit integer datetimes by default, per previous discussion. This requires a working 64-bit integer type. If such a type cannot be found, "--disable-integer-datetimes" can be used to switch back to the previous floating point-based datetime implementation. --- doc/src/sgml/config.sgml | 12 ++++++------ doc/src/sgml/datatype.sgml | 41 ++++++++++++++++++++++++----------------- doc/src/sgml/installation.sgml | 21 ++++++++++++++------- 3 files changed, 44 insertions(+), 30 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 4f6d0c709c9..fa8ce23a46c 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ - + Server Configuration @@ -4740,11 +4740,11 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' - Reports whether PostgreSQL was built - with support for 64-bit-integer dates and times. It is set by - configuring with --enable-integer-datetimes - when building PostgreSQL. The - default value is off. + Reports whether PostgreSQL was built with + support for 64-bit-integer dates and times. This can be + disabled by configuring with --disable-integer-datetimes + when building PostgreSQL. The default value is + on. diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index f36ec178d88..fb813d70423 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,4 +1,4 @@ - + Data Types @@ -1408,7 +1408,7 @@ SELECT b, char_length(b) FROM test2; 8 bytes both date and time 4713 BC - 5874897 AD + 294276 AD 1 microsecond / 14 digits @@ -1416,7 +1416,7 @@ SELECT b, char_length(b) FROM test2; 8 bytes both date and time, with time zone 4713 BC - 5874897 AD + 294276 AD 1 microsecond / 14 digits @@ -1475,20 +1475,27 @@ SELECT b, char_length(b) FROM test2; - When timestamp values are stored as double precision floating-point - numbers (currently the default), the effective limit of precision - might be less than 6. timestamp values are stored as seconds - before or after midnight 2000-01-01. Microsecond precision is achieved for - dates within a few years of 2000-01-01, but the precision degrades for - dates further away. When timestamp values are stored as - eight-byte integers (a compile-time - option), microsecond precision is available over the full range of - values. However eight-byte integer timestamps have a more limited range of - dates than shown above: from 4713 BC up to 294276 AD. The same - compile-time option also determines whether time and - interval values are stored as floating-point or eight-byte - integers. In the floating-point case, large interval values - degrade in precision as the size of the interval increases. + When timestamp values are stored as eight-byte integers + (currently the default), microsecond precision is available over + the full range of values. When timestamp values are + stored as double precision floating-point numbers instead (a + deprecated compile-time option), the effective limit of precision + might be less than 6. timestamp values are stored as + seconds before or after midnight 2000-01-01. When + timestamp values are implemented using floating-point + numbers, microsecond precision is achieved for dates within a few + years of 2000-01-01, but the precision degrades for dates further + away. Note that using floating-point datetimes allows a larger + range of timestamp values to be represented than + shown above: from 4713 BC up to 5874897 AD. + + + + The same compile-time option also determines whether + time and interval values are stored as + floating-point numbers or eight-byte integers. In the + floating-point case, large interval values degrade in + precision as the size of the interval increases. diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 1ed17530ff5..e0de70e91f1 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1,4 +1,4 @@ - + <![%standalone-include[<productname>PostgreSQL</>]]> @@ -1011,16 +1011,23 @@ su - postgres </varlistentry> <varlistentry> - <term><option>--enable-integer-datetimes</option></term> + <term><option>--disable-integer-datetimes</option></term> <listitem> <para> - Use 64-bit integer storage for datetimes and intervals, rather - than the default floating-point storage. This reduces the range - of representable values but guarantees microsecond precision across - the full range (see + Disable support for 64-bit integer storage for timestamps and + intervals, and store datetime values as floating-point + numbers instead. Floating-point datetime storage was the + default in <productname>PostgreSQL</productname> releases + prior to 8.4, but it is now deprecated, because it does not + support microsecond precision for the full range of + <type>timestamp</type> values. However, integer-based + datetime storage requires a 64-bit integer type. Therefore, + this option can be used when no such type is available, or + for compatibility with applications written for prior + versions of <productname>PostgreSQL</productname>. See <![%standalone-include[the documentation about datetime datatypes]]> <![%standalone-ignore[<xref linkend="datatype-datetime">]]> - for more information). + for more information. </para> </listitem> </varlistentry> -- cgit v1.2.3