Clarify documentation for "day of the week" handling for to_char() and
authorBruce Momjian
Mon, 19 Feb 2007 18:20:06 +0000 (18:20 +0000)
committerBruce Momjian
Mon, 19 Feb 2007 18:20:06 +0000 (18:20 +0000)
EXTRACT().

doc/src/sgml/func.sgml

index ac7a0d16389643a4c5727029f8aacce079a776ec..1b336ba65def0565b85e82d13fce94247d924f06 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
  
   Functions and Operators
@@ -4617,11 +4617,11 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
        
        
         D
-        day of week (1-7; Sunday is 1)
+        day of the week, Sunday(1) to Saturday(7)
        
        
         ID
-        ISO day of week (1-7; Monday is 1)
+        ISO day of the week, Monday(1) to Sunday(7)
        
        
         W
@@ -4844,9 +4844,11 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
      
 
      
-      to_char's day of the week numbering
-        (see the 'D' formatting pattern) is different from that of the 
-        extract function.
+      
+        to_char(..., 'ID')'s day of the week numbering
+        matches the extract('isodow', ...) function.
+        to_char(..., 'D')'s does not match
+        extract('dow', ...)'s day numbering.
       
      
 
@@ -5741,8 +5743,9 @@ SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40');
 Result: 5
 
        
-        Note that extract's day of the week numbering is
-        different from that of the to_char function.
+        Note that extract's day of the week numbering
+        is different from that of the to_char(...,
+        'D') function.