From: Thomas G. Lockhart Date: Fri, 21 Dec 2001 03:54:02 +0000 (+0000) Subject: Spiff up discussion of precision on date/time data types. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=816e4b06ba0feb0249eb4f002ab8d99f55e66e1c;p=users%2Fbernd%2Fpostgres.git Spiff up discussion of precision on date/time data types. Add a NetBSD/alpha and update info on a few other platforms. --- diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 84b7122820..ae7ac01e75 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1328,21 +1328,20 @@ SELECT b, char_length(b) FROM test2; time and timestamp both accept an - option precision field p which + optional precision field p which determines the number of digits retained beyond the seconds decimal point. By default, there is no explicit bound on precision and the actual precision is determined by the underlying double precision floating point number used to store values in seconds for interval and - since 2000-01-01 in the case of timestamp. + in seconds since 2000-01-01 for timestamp. Time zones, and time-zone conventions, are influenced by - political decisions, not just physical effects. Time zones have - become somewhat standardized around the world during the 1900's, - but continue to - be prone to arbitrary changes. + political decisions, not just geometry. Time zones around the + world became somewhat standardized during the 1900's, + but continue to be prone to arbitrary changes. PostgreSQL uses your operating system's underlying features to provide time-zone support, and these systems usually contain information for only @@ -1354,13 +1353,15 @@ SELECT b, char_length(b) FROM test2; - To ensure compatibility to earlier versions of PostgreSQL + To ensure compatibility to earlier versions of + PostgreSQL we continue to provide datetime (equivalent to timestamp) and timespan (equivalent to interval), however support for these is now restricted to having an implicit translation to timestamp and - interval. + interval, and these name mappings will be removed in + the next version. The types abstime and reltime are lower precision types which are used internally. You are discouraged from using any of these types in new @@ -1376,9 +1377,12 @@ SELECT b, char_length(b) FROM test2; Date and time input is accepted in almost any reasonable format, including ISO 8601, SQL-compatible, traditional PostgreSQL, and others. - The ordering of month and day in date input can be ambiguous, therefore a setting - exists to specify how it should be interpreted in ambiguous cases. The command - SET DateStyle TO 'US' or SET DateStyle TO 'NonEuropean' + For some formats, ordering of month and day in date input can be + ambiguous and there is support for specifying the expected + ordering of these fields. + The command + SET DateStyle TO 'US' + or SET DateStyle TO 'NonEuropean' specifies the variant month before day, the command SET DateStyle TO 'European' sets the variant day before month. The ISO style @@ -1386,24 +1390,29 @@ SELECT b, char_length(b) FROM test2; + PostgreSQL is more flexible in + handling date/time than the + SQL standard requires. See - for the exact parsing rules of date/time input and for the recognized time zones. + for the exact parsing rules of date/time input and for the + recognized time zones. - Remember that any date or time input needs to be enclosed into - single quotes, like text strings. Refer to for more information. + Remember that any date or time literal input needs to be enclosed + in single quotes, like text strings. Refer to + for more + information. SQL9x requires the following syntax type [ (p) ] 'value' - where p is an integer specifying the - number of fractional digits in the seconds field, and is allowed - for time, timestamp, and interval types. - PostgreSQL is more flexible in - handling date/time than the - SQL standard requires. + where p in the optional precision + specification is an integer corresponding to the + number of fractional digits in the seconds field. Precision can + be specified + for time, timestamp, and + interval types. diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml index 319697bcbc..39fffee955 100644 --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -1372,9 +1372,10 @@ gunzip -c user.ps.gz \ AIX RS6000 7.2 - 2001-11-28, - Andreas Zeugswetter (ZeugswetterA@spardat.at) - 4.3; see also doc/FAQ_AIX + 2001-12-19, + Andreas Zeugswetter (ZeugswetterA@spardat.at), + Tatsuo Ishii (t-ishii@sra.co.jp) + see also doc/FAQ_AIX BeOS @@ -1392,6 +1393,14 @@ gunzip -c user.ps.gz \ Bruce Momjian (pgman@candle.pha.pa.us) 4.2 + + FreeBSD + Alpha + 7.2 + 2001-12-18, + Chris Kings-Lynne (chriskl@familyhealth.com.au) + + FreeBSD x86 @@ -1428,9 +1437,9 @@ gunzip -c user.ps.gz \ Linux armv4l - 7.1 - 2001-02-22, - Mark Knox (markk@pixin.net) + 7.2 + 2001-12-10, + Mark Knox (segfault@hardline.org) 2.2.x @@ -1441,6 +1450,14 @@ gunzip -c user.ps.gz \ Hisao Shibuya (shibuya@alpha.or.jp) 2.0.x; Cobalt Qube2 + + Linux + PlayStation2 + 7.2 + 2001-12-12, + Permaine Cheung pcheung@redhat.com) + #undef HAS_TEST_AND_SET, slock_t + Linux PPC74xx @@ -1452,9 +1469,9 @@ gunzip -c user.ps.gz \ Linux S/390 - 7.1 - 2000-11-17, - Neale Ferguson (Neale.Ferguson@softwareAG-usa.com) + 7.2 + 2001-12-12, + Permaine Cheung pcheung@redhat.com) @@ -1565,11 +1582,20 @@ gunzip -c user.ps.gz \ QNX 4.25 x86 - 7.1 - 2001-05-24, + 7.2 + 2001-12-10, Bernd Tegge (tegge@repas-aeg.de) see also doc/FAQ_QNX4 + + + QNX 6 + x86 + 7.2 + 2001-12-10, + Igor Kovalenko (Igor.Kovalenko@motorola.com) + + Requires patches for Posix semaphores; see archives Solaris @@ -1587,22 +1613,43 @@ gunzip -c user.ps.gz \ Martin Renters (martin@datafax.com) 2.8; see also doc/FAQ_Solaris + + SunOS + Sparc + 7.2 + 2001-12-04, Tatsuo Ishii (t-ishii@sra.co.jp) + + Tru64 UNIX Alpha 7.2 2001-11-26, - Alessio Bragadini (alessio@albourne.com) - 4.0g, with cc and gcc + Alessio Bragadini (alessio@albourne.com), + Bernd Tegge (tegge@repas-aeg.de) + 5.0; 4.0g with cc and gcc - Windows NT/2000 + Windows x86 - 7.1 - 2001-03-16, + 7.2 + 2001-12-13, + Dave Page (dpage@vale-housing.co.uk), Jason Tishler (jason@tishler.net) - with Cygwin tool set, see doc/FAQ_MSWIN + with Cygwin; see doc/FAQ_MSWIN + + Windows + x86 + 7.2 + 2001-12-10, + Dave Page (dpage@vale-housing.co.uk) + + native is client-side only; + +]]> + + @@ -1668,14 +1715,7 @@ Obsolete platform? This distro was merged into PPC afaik. - thomas 2001-12-07 x86 6.5 1999-05-25, Andrew Merrill (andrew@compclass.com) - 7.2 should work, but no reports; see also doc/FAQ_SCO - - - SunOS - Sparc - 7.2 - 2001-12-04, Tatsuo Ishii (t-ishii@sra.co.jp) - memcmp() does not work correctly, so probably not reliable + &version; should work, but no reports; see also doc/FAQ_SCO System V R4 @@ -1703,24 +1743,11 @@ Obsolete platform? This distro was merged into PPC afaik. - thomas 2001-12-07 VAX 6.x 1998-03-01 - no recent reports - - - Windows 9x, ME, NT, 2000 (native) - x86 - 7.1 - 2001-03-26, Magnus Hagander (mha@sollentuna.net) - - client-side libraries (libpq and psql) or ODBC or JDBC, no server-side; -Administrator's Guide]]> -]]> - for instructions - + -