mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +03:00
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.
This commit is contained in:
@ -5548,6 +5548,15 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<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
|
||||
|
Reference in New Issue
Block a user