aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2011-09-07 09:47:51 -0400
committerBruce Momjian <bruce@momjian.us>2011-09-07 09:47:51 -0400
commit029dfdf1157b6d837a7b7211cd35b00c6bcd767c (patch)
treefacdd79b00acf28c37c48762e56f3d4afc246b39 /doc/src
parent8eacb25cbe9100b9cf441d4cbca4cec8fa5e3f52 (diff)
downloadpostgresql-029dfdf1157b6d837a7b7211cd35b00c6bcd767c.tar.gz
postgresql-029dfdf1157b6d837a7b7211cd35b00c6bcd767c.zip
Fix to_date() and to_timestamp() to handle year masks of length < 4 so
they wrap toward year 2020, rather than the inconsistent behavior we had before.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index c03dd6c8a3e..0b6a109432e 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -5550,6 +5550,15 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
<listitem>
<para>
+ If the year format specification is less than four digits, e.g.
+ <literal>YYY</>, and the supplied year is less than four digits,
+ the year will be adjusted to be nearest to the year 2020, e.g.
+ <literal>95</> becomes 1995.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
The <literal>YYYY</literal> conversion from string to <type>timestamp</type> or
<type>date</type> has a restriction when processing years with more than 4 digits. You must
use some non-digit character or template after <literal>YYYY</literal>,