1- <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.361 2007/02/16 07:46:54 petere Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.362 2007/02/19 17:41:38 momjian Exp $ -->
22
33 <chapter id="functions">
44 <title>Functions and Operators</title>
@@ -5732,16 +5732,16 @@ SELECT EXTRACT(DECADE FROM TIMESTAMP '2001-02-16 20:38:40');
57325732 <term><literal>dow</literal></term>
57335733 <listitem>
57345734 <para>
5735- The day of the week (0 - 6; Sunday is 0) (for
5736- <type>timestamp</type> values only )
5735+ The day of the week as Sunday(<literal>0</>) to
5736+ Saturday(<literal>6</> )
57375737 </para>
57385738
57395739<screen>
57405740SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40');
57415741<lineannotation>Result: </lineannotation><computeroutput>5</computeroutput>
57425742</screen>
57435743 <para>
5744- Note that <function>extract</function>'s day of the week numbering is
5744+ Note that <function>extract</function>'s day of the week numbering is
57455745 different from that of the <function>to_char</function> function.
57465746 </para>
57475747
@@ -5752,7 +5752,7 @@ SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40');
57525752 <term><literal>doy</literal></term>
57535753 <listitem>
57545754 <para>
5755- The day of the year (1 - 365/366) (for <type>timestamp</type> values only)
5755+ The day of the year (1 - 365/366)
57565756 </para>
57575757
57585758<screen>
@@ -5805,6 +5805,26 @@ SELECT EXTRACT(HOUR FROM TIMESTAMP '2001-02-16 20:38:40');
58055805 </listitem>
58065806 </varlistentry>
58075807
5808+ <varlistentry>
5809+ <term><literal>isodow</literal></term>
5810+ <listitem>
5811+ <para>
5812+ The day of the week as Monday(<literal>1</>) to
5813+ Sunday(<literal>7</>)
5814+ </para>
5815+
5816+ <screen>
5817+ SELECT EXTRACT(ISODOW FROM TIMESTAMP '2001-02-18 20:38:40');
5818+ <lineannotation>Result: </lineannotation><computeroutput>7</computeroutput>
5819+ </screen>
5820+ <para>
5821+ This is identical to <literal>dow</> except for Sunday. This
5822+ matches the <acronym>ISO</> 8601 day of the week numbering.
5823+ </para>
5824+
5825+ </listitem>
5826+ </varlistentry>
5827+
58085828 <varlistentry>
58095829 <term><literal>isoyear</literal></term>
58105830 <listitem>
@@ -5923,8 +5943,7 @@ SELECT EXTRACT(MONTH FROM INTERVAL '2 years 13 months');
59235943 <term><literal>quarter</literal></term>
59245944 <listitem>
59255945 <para>
5926- The quarter of the year (1 - 4) that the day is in (for
5927- <type>timestamp</type> values only)
5946+ The quarter of the year (1 - 4) that the day is in
59285947 </para>
59295948
59305949<screen>
@@ -5989,7 +6008,7 @@ SELECT EXTRACT(SECOND FROM TIME '17:12:28.5');
59896008 (<acronym>ISO</acronym> 8601), the first week of a year
59906009 contains January 4 of that year. (The <acronym>ISO</acronym>-8601
59916010 week starts on Monday.) In other words, the first Thursday of
5992- a year is in week 1 of that year. (for <type>timestamp</type> values only)
6011+ a year is in week 1 of that year.
59936012 </para>
59946013 <para>
59956014 Because of this, it is possible for early January dates to be part of the
0 commit comments