File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.382 2007/06/06 23:00:35 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.383 2007/07/18 03:12:42 momjian Exp $ -->
2
2
3
3
<chapter id="functions">
4
4
<title>Functions and Operators</title>
@@ -5895,6 +5895,17 @@ SELECT (DATE '2001-02-16', INTERVAL '100 days') OVERLAPS
5895
5895
<literal>CST7CDT</literal>.
5896
5896
</para>
5897
5897
5898
+ <para>
5899
+ Note that when the <function>age</> function operates on multi-month
5900
+ intervals, <productname>PostgreSQL</> adds days to the earlier date
5901
+ until full months can be added. This yields a different result than
5902
+ adding full months first if the interval crosses from one month to the
5903
+ next. For example, <literal>age('2004-06-01', '2004-04-30')</> yeilds
5904
+ <literal>1 mon 1 day</> using the <productname>PostgreSQL</> method,
5905
+ while adding the month first would yield <literal>1 mon 2 days</>
5906
+ because May has 31 days, while April has only 30.
5907
+ </para>
5908
+
5898
5909
<sect2 id="functions-datetime-extract">
5899
5910
<title><function>EXTRACT</function>, <function>date_part</function></title>
5900
5911
You can’t perform that action at this time.
0 commit comments