diff options
-rw-r--r-- | doc/src/sgml/func.sgml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index a1f627cbd6c..b1ea46677c1 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -5785,6 +5785,20 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); <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> templates and will be output literally. You can put a substring in double quotes to force it to be interpreted as literal text |