Improve extract(day) documentation with interval values.
authorBruce Momjian
Fri, 11 Mar 2011 13:17:49 +0000 (08:17 -0500)
committerBruce Momjian
Fri, 11 Mar 2011 13:17:49 +0000 (08:17 -0500)
doc/src/sgml/func.sgml

index 4635cf2bb5e89e02d357450229e625b7a3fa33f3..c392109e6d3d463116d7c52406d36b9b7045a96d 100644 (file)
@@ -6605,13 +6605,20 @@ SELECT EXTRACT(CENTURY FROM TIMESTAMP '2001-02-16 20:38:40');
       day
       
        
-        The day (of the month) field (1 - 31)
+        For timestamp values, the day (of the month) field
+        (1 - 31) ; for interval values, the number of days
        
 
 
 SELECT EXTRACT(DAY FROM TIMESTAMP '2001-02-16 20:38:40');
 Result: 16
+
+SELECT EXTRACT(DAY FROM INTERVAL '40 days 1 minute');
+Result: 40
 
+
+
+
       
      
 
@@ -6827,7 +6834,7 @@ SELECT EXTRACT(MINUTE FROM TIMESTAMP '2001-02-16 20:38:40');
       
        
         For timestamp values, the number of the month
-        within the year (1 - 12) ; for interval values
+        within the year (1 - 12) ; for interval values,
         the number of months, modulo 12 (0 - 11)