git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ea5c4c7)
Improve extract(day) documentation with interval values.
2011年3月11日 13:17:49 +0000 (08:17 -0500)
2011年3月11日 13:17:49 +0000 (08:17 -0500)

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 4635cf2bb5e89e02d357450229e625b7a3fa33f3..c392109e6d3d463116d7c52406d36b9b7045a96d 100644 (file)
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -6605,13 +6605,20 @@ SELECT EXTRACT(CENTURY FROM TIMESTAMP '2001年02月16日 20:38:40');
<term><literal>day</literal></term>
<listitem>
<para>
- The day (of the month) field (1 - 31)
+ For <type>timestamp</type> values, the day (of the month) field
+ (1 - 31) ; for <type>interval</type> values, the number of days
</para>
<screen>
SELECT EXTRACT(DAY FROM TIMESTAMP '2001年02月16日 20:38:40');
<lineannotation>Result: </lineannotation><computeroutput>16</computeroutput>
+
+SELECT EXTRACT(DAY FROM INTERVAL '40 days 1 minute');
+<lineannotation>Result: </lineannotation><computeroutput>40</computeroutput>
</screen>
+
+
+
</listitem>
</varlistentry>
@@ -6827,7 +6834,7 @@ SELECT EXTRACT(MINUTE FROM TIMESTAMP '2001年02月16日 20:38:40');
<listitem>
<para>
For <type>timestamp</type> values, the number of the month
- within the year (1 - 12) ; for <type>interval</type> values
+ within the year (1 - 12) ; for <type>interval</type> values,
the number of months, modulo 12 (0 - 11)
</para>
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /