Skip to content

Commit cbd2811

Browse files
committed
Improve extract(day) documentation with interval values.
1 parent ea5c4c7 commit cbd2811

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

doc/src/sgml/func.sgml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6605,13 +6605,20 @@ SELECT EXTRACT(CENTURY FROM TIMESTAMP '2001-02-16 20:38:40');
66056605
<term><literal>day</literal></term>
66066606
<listitem>
66076607
<para>
6608-
The day (of the month) field (1 - 31)
6608+
For <type>timestamp</type> values, the day (of the month) field
6609+
(1 - 31) ; for <type>interval</type> values, the number of days
66096610
</para>
66106611

66116612
<screen>
66126613
SELECT EXTRACT(DAY FROM TIMESTAMP '2001-02-16 20:38:40');
66136614
<lineannotation>Result: </lineannotation><computeroutput>16</computeroutput>
6615+
6616+
SELECT EXTRACT(DAY FROM INTERVAL '40 days 1 minute');
6617+
<lineannotation>Result: </lineannotation><computeroutput>40</computeroutput>
66146618
</screen>
6619+
6620+
6621+
66156622
</listitem>
66166623
</varlistentry>
66176624

@@ -6827,7 +6834,7 @@ SELECT EXTRACT(MINUTE FROM TIMESTAMP '2001-02-16 20:38:40');
68276834
<listitem>
68286835
<para>
68296836
For <type>timestamp</type> values, the number of the month
6830-
within the year (1 - 12) ; for <type>interval</type> values
6837+
within the year (1 - 12) ; for <type>interval</type> values,
68316838
the number of months, modulo 12 (0 - 11)
68326839
</para>
68336840

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy