1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Fix to_date to behave reasonably when CC and YY fields are both used.

Karel Zak
This commit is contained in:
Tom Lane
2005-03-25 16:08:40 +00:00
parent c90578a1d6
commit 6e26c00297
2 changed files with 41 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.241 2005/03/14 18:31:19 momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.242 2005/03/25 16:08:39 tgl Exp $
PostgreSQL documentation
-->
@@ -4470,6 +4470,17 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
</para>
</listitem>
<listitem>
<para>
In conversions from string to <type>timestamp</type> or
<type>date</type>, the <literal>CC</literal> field is ignored if there
is a <literal>YYY</literal>, <literal>YYYY</literal> or
<literal>Y,YYY</literal> field. If <literal>CC</literal> is used with
<literal>YY</literal> or <literal>Y</literal> then the year is computed
as <literal>(CC-1)*100+YY</literal>.
</para>
</listitem>
<listitem>
<para>
Millisecond (<literal>MS</literal>) and microsecond (<literal>US</literal>)