Commit 4828445d authored by Tom Lane's avatar Tom Lane

Clarify documentation of age() functions.

parent 5374d097
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.224 2004/11/27 21:27:06 petere Exp $ $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.225 2004/12/01 19:32:12 tgl Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -4877,19 +4877,20 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation> ...@@ -4877,19 +4877,20 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
<tbody> <tbody>
<row> <row>
<entry><literal><function>age</function>(<type>timestamp</type>)</literal></entry> <entry><literal><function>age</function>(<type>timestamp</type>, <type>timestamp</type>)</literal></entry>
<entry><type>interval</type></entry> <entry><type>interval</type></entry>
<entry>Subtract from today</entry> <entry>Subtract arguments, producing a <quote>symbolic</> result that
<entry><literal>age(timestamp '1957-06-13')</literal></entry> uses years and months</entry>
<entry><literal>43 years 8 mons 3 days</literal></entry> <entry><literal>age(timestamp '2001-04-10', timestamp '1957-06-13')</literal></entry>
<entry><literal>43 years 9 mons 27 days</literal></entry>
</row> </row>
<row> <row>
<entry><literal><function>age</function>(<type>timestamp</type>, <type>timestamp</type>)</literal></entry> <entry><literal><function>age</function>(<type>timestamp</type>)</literal></entry>
<entry><type>interval</type></entry> <entry><type>interval</type></entry>
<entry>Subtract arguments</entry> <entry>Subtract from <function>current_date</function></entry>
<entry><literal>age('2001-04-10', timestamp '1957-06-13')</literal></entry> <entry><literal>age(timestamp '1957-06-13')</literal></entry>
<entry><literal>43 years 9 mons 27 days</literal></entry> <entry><literal>43 years 8 mons 3 days</literal></entry>
</row> </row>
<row> <row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment