Fix incorrect example of to_timestamp() usage.
authorTom Lane <[email protected]>
Thu, 29 Dec 2016 23:05:34 +0000 (18:05 -0500)
committerTom Lane <[email protected]>
Thu, 29 Dec 2016 23:05:48 +0000 (18:05 -0500)
Must use HH24 not HH to read a hour value exceeding 12.

This was already fixed in HEAD in commit d3cd36a13, but I didn't think
of backpatching it.

Report: https://postgr.es/m/20161229170043[email protected]

doc/src/sgml/func.sgml

index 98c7e3403806235e622e8cb6cb832db55ab5019c..89c75b7bee4a8b780b15bbd049478c90da8cc45c 100644 (file)
@@ -5988,7 +5988,7 @@ SELECT regexp_matches('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
       <para>
        Here is a more
        complex example:
-       <literal>to_timestamp('15:12:02.020.001230', 'HH:MI:SS.MS.US')</literal>
+       <literal>to_timestamp('15:12:02.020.001230', 'HH24:MI:SS.MS.US')</literal>
        is 15 hours, 12 minutes, and 2 seconds + 20 milliseconds +
        1230 microseconds = 2.021230 seconds.
       </para>