Fix documentation to specify the correct range of timezone offsets for
authorTom Lane
Sat, 22 Oct 2005 19:33:57 +0000 (19:33 +0000)
committerTom Lane
Sat, 22 Oct 2005 19:33:57 +0000 (19:33 +0000)
type time with time zone, ie, +/- 13:59 not +/- 12:00.  Also some minor
wording improvements.

doc/src/sgml/datatype.sgml

index 1663b617ee788920e140a0c90a15bbf07418a275..03732ba9cab06116f9f9fd6e3b366fb59bfc87c4 100644 (file)
@@ -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.