Skip to content

Commit 4828445

Browse files
committed
Clarify documentation of age() functions.
1 parent 5374d09 commit 4828445

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

doc/src/sgml/func.sgml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.224 2004/11/27 21:27:06 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.225 2004/12/01 19:32:12 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -4877,19 +4877,20 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
48774877

48784878
<tbody>
48794879
<row>
4880-
<entry><literal><function>age</function>(<type>timestamp</type>)</literal></entry>
4880+
<entry><literal><function>age</function>(<type>timestamp</type>, <type>timestamp</type>)</literal></entry>
48814881
<entry><type>interval</type></entry>
4882-
<entry>Subtract from today</entry>
4883-
<entry><literal>age(timestamp '1957-06-13')</literal></entry>
4884-
<entry><literal>43 years 8 mons 3 days</literal></entry>
4882+
<entry>Subtract arguments, producing a <quote>symbolic</> result that
4883+
uses years and months</entry>
4884+
<entry><literal>age(timestamp '2001-04-10', timestamp '1957-06-13')</literal></entry>
4885+
<entry><literal>43 years 9 mons 27 days</literal></entry>
48854886
</row>
48864887

48874888
<row>
4888-
<entry><literal><function>age</function>(<type>timestamp</type>, <type>timestamp</type>)</literal></entry>
4889+
<entry><literal><function>age</function>(<type>timestamp</type>)</literal></entry>
48894890
<entry><type>interval</type></entry>
4890-
<entry>Subtract arguments</entry>
4891-
<entry><literal>age('2001-04-10', timestamp '1957-06-13')</literal></entry>
4892-
<entry><literal>43 years 9 mons 27 days</literal></entry>
4891+
<entry>Subtract from <function>current_date</function></entry>
4892+
<entry><literal>age(timestamp '1957-06-13')</literal></entry>
4893+
<entry><literal>43 years 8 mons 3 days</literal></entry>
48934894
</row>
48944895

48954896
<row>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy