diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-10-14 17:12:33 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-10-14 17:12:33 +0000 |
| commit | a303e4dc431627231238c9071ae79198c95b4581 (patch) | |
| tree | bb7938d9f2350accf70b2381d75b278d48178220 /doc/src | |
| parent | 791359fe0eae83641f0929159d5861359d395e97 (diff) | |
Extend the date type to support infinity and -infinity, analogously to
the timestamp types. Turns out this doesn't even reduce the available
range of dates, since the restriction to dates that work for Julian-date
arithmetic is much tighter than the int32 range anyway. Per a longstanding
TODO item.
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/datatype.sgml | 6 | ||||
| -rw-r--r-- | doc/src/sgml/func.sgml | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index d05c93058a0..26521661b7f 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.229 2008/10/03 15:37:18 petere Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.230 2008/10/14 17:12:32 tgl Exp $ --> <chapter id="datatype"> <title id="datatype-title">Data Types</title> @@ -2032,12 +2032,12 @@ January 8 04:05:06 1999 PST </row> <row> <entry><literal>infinity</literal></entry> - <entry><type>timestamp</type></entry> + <entry><type>date</type>, <type>timestamp</type></entry> <entry>later than all other time stamps</entry> </row> <row> <entry><literal>-infinity</literal></entry> - <entry><type>timestamp</type></entry> + <entry><type>date</type>, <type>timestamp</type></entry> <entry>earlier than all other time stamps</entry> </row> <row> diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index e289326f2fb..06ee6a0572f 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.449 2008/10/13 16:25:19 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.450 2008/10/14 17:12:32 tgl Exp $ --> <chapter id="functions"> <title>Functions and Operators</title> @@ -5913,9 +5913,17 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); </row> <row> + <entry><literal><function>isfinite</function>(<type>date</type>)</literal></entry> + <entry><type>boolean</type></entry> + <entry>Test for finite date (not +/-infinity)</entry> + <entry><literal>isfinite(date '2001-02-16')</literal></entry> + <entry><literal>true</literal></entry> + </row> + + <row> <entry><literal><function>isfinite</function>(<type>timestamp</type>)</literal></entry> <entry><type>boolean</type></entry> - <entry>Test for finite time stamp (not equal to infinity)</entry> + <entry>Test for finite time stamp (not +/-infinity)</entry> <entry><literal>isfinite(timestamp '2001-02-16 21:28:30')</literal></entry> <entry><literal>true</literal></entry> </row> |
