mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-13 19:57:53 +08:00
docs: to_timestamp and to_date do minimal range checking
Initial patch from Steve Crawford
This commit is contained in:
parent
b44fc39fce
commit
e2224faf17
@ -5783,6 +5783,20 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
<function>to_timestamp</function> and <function>to_date</function>
|
||||
exist to handle input formats that cannot be converted by
|
||||
simple casting. These functions interpret input liberally,
|
||||
with minimal error checking. While they produce valid output,
|
||||
the conversion can yield unexpected results. For example,
|
||||
input to these functions is not restricted by normal ranges,
|
||||
thus <literal>to_date('20096040','YYYYMMDD')</literal> returns
|
||||
<literal>2014-01-17</literal> rather than causing an error.
|
||||
Casting does not have this behavior.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Ordinary text is allowed in <function>to_char</function>
|
||||
|
Loading…
x
Reference in New Issue
Block a user