Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit70007b4

Browse files
committed
Clarify documentation for "day of the week" handling for to_char() and
EXTRACT().
1 parent107062e commit70007b4

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.362 2007/02/1917:41:38 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.363 2007/02/1918:20:06 momjian Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -4617,11 +4617,11 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
46174617
</row>
46184618
<row>
46194619
<entry><literal>D</literal></entry>
4620-
<entry>day of week (1-7; Sunday is 1)</entry>
4620+
<entry>day oftheweek, Sunday(<literal>1</>) to Saturday(<literal>7</>)</entry>
46214621
</row>
46224622
<row>
46234623
<entry><literal>ID</literal></entry>
4624-
<entry>ISO day of week (1-7; Monday is 1)</entry>
4624+
<entry>ISO day oftheweek, Monday(<literal>1</>) to Sunday(<literal>7</>)</entry>
46254625
</row>
46264626
<row>
46274627
<entry><literal>W</literal></entry>
@@ -4844,9 +4844,11 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
48444844
</listitem>
48454845

48464846
<listitem>
4847-
<para><function>to_char</function>'s day of the week numbering
4848-
(see the 'D' formatting pattern) is different from that of the
4849-
<function>extract</function> function.
4847+
<para>
4848+
<function>to_char(..., 'ID')</function>'s day of the week numbering
4849+
matches the <function>extract('isodow', ...)</function> function.
4850+
<function>to_char(..., 'D')</function>'s does not match
4851+
<function>extract('dow', ...)</function>'s day numbering.
48504852
</para>
48514853
</listitem>
48524854

@@ -5741,8 +5743,9 @@ SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40');
57415743
<lineannotation>Result: </lineannotation><computeroutput>5</computeroutput>
57425744
</screen>
57435745
<para>
5744-
Note that <function>extract</function>'s day of the week numbering is
5745-
different from that of the <function>to_char</function> function.
5746+
Note that <function>extract</function>'s day of the week numbering
5747+
is different from that of the <function>to_char(...,
5748+
'D')</function> function.
57465749
</para>
57475750

57485751
</listitem>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp