From 96b85f1ccb25bab44ffacf307e9b5fed8577f644 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 22 Oct 2005 19:33:57 +0000 Subject: [PATCH] Fix documentation to specify the correct range of timezone offsets for type time with time zone, ie, +/- 13:59 not +/- 12:00. Also some minor wording improvements. --- doc/src/sgml/datatype.sgml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 1663b617ee..03732ba9ca 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,5 +1,5 @@ @@ -1367,7 +1367,7 @@ SELECT b, char_length(b) FROM test2; time [ (p) ] [ without time zone ] 8 bytes times of day only - 00:00:00.00 + 00:00:00 24:00:00 1 microsecond / 14 digits @@ -1375,8 +1375,8 @@ SELECT b, char_length(b) FROM test2; time [ (p) ] with time zone 12 bytes times of day only, with time zone - 00:00:00.00+12 - 24:00:00-12 + 00:00:00+1359 + 24:00:00-1359 1 microsecond / 14 digits @@ -1759,19 +1759,22 @@ January 8 04:05:06 1999 PST The SQL standard differentiates timestamp without time zone - and timestamp with time zone literals by the existence of a - +; or -. Hence, according to the standard, + and timestamp with time zone literals by the presence of a + + or -. Hence, according to the standard, TIMESTAMP '2004-10-19 10:23:54' is a timestamp without time zone, while TIMESTAMP '2004-10-19 10:23:54+02' is a timestamp with time zone. - PostgreSQL - differs from the standard by requiring that timestamp with time zone - literals be explicitly typed: + PostgreSQL never examines the content of a + literal string before determining its type, and therefore will treat + both of the above as timestamp without time zone. To + ensure that a literal is treated as timestamp with time + zone, give it the correct explicit type: TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02' - If a literal is not explicitly indicated as being of timestamp with time zone, - PostgreSQL will silently ignore any time zone indication in the literal. - That is, the resulting date/time value is derived from the date/time + In a literal that has been decided to be timestamp without time + zone, PostgreSQL will silently ignore + any time zone indication. + That is, the resulting value is derived from the date/time fields in the input value, and is not adjusted for time zone. -- 2.11.0