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

Commitbbb2e21

Browse files
committed
I was recently surprised to find that EXTRACT's day of the week
numbering is different than TO_CHAR's ditto. EXTRACT starts at 0==Sundaywhile TO_CHAR starts at 1==Sunday.A suggestion for two documentation notes is attached as a patch tocurrent CVS HEAD.Troels Arvin
1 parent93b808e commitbbb2e21

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.230 2004/12/13 18:05:08 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.231 2004/12/21 01:02:28 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -4412,6 +4412,13 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
44124412
1230 microseconds = 2.021230 seconds.
44134413
</para>
44144414
</listitem>
4415+
4416+
<listitem>
4417+
<para><function>to_char</function>'s day of the week numbering
4418+
(see the 'D' formatting pattern) is different from that of the
4419+
<function>extract</function> function.
4420+
</para>
4421+
</listitem>
44154422
</itemizedlist>
44164423
</para>
44174424

@@ -5146,6 +5153,11 @@ SELECT EXTRACT(DECADE FROM TIMESTAMP '2001-02-16 20:38:40');
51465153
SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40');
51475154
<lineannotation>Result: </lineannotation><computeroutput>5</computeroutput>
51485155
</screen>
5156+
<para>
5157+
Note that <function>extract</function>'s day of the week numbering is
5158+
different from that of the <function>to_char</function> function.
5159+
</para>
5160+
51495161
</listitem>
51505162
</varlistentry>
51515163

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp