From 0d304935aa5b83e56127b5a63aa3d180b4c42e16 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 30 Mar 2019 03:42:35 -0500 Subject: [PATCH v3] Clean up language in cf984672: Improve behavior of to_timestamp()/to_date() functions --- doc/src/sgml/func.sgml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 96fafdd..b420585 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -6400,20 +6400,20 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); If FX is specified, a separator in the template string - matches exactly one character in input string. Notice we don't insist the - input string character be the same as the template string separator. + matches exactly one character in the input string. But note that the + input string character is not required to be the same as the separator from the template string. For example, to_timestamp('2000/JUN', 'FXYYYY MON') works, but to_timestamp('2000/JUN', 'FXYYYY  MON') - returns an error because the second template string space is consumed - by the letter J in the input string. + returns an error because the second space in the template string consumes + the letter M from the input string. A TZH template pattern can match a signed number. - Without the FX option, it can lead to ambiguity in - interpretation of the minus sign, which can also be interpreted as a separator. + Without the FX option, minus signs may be ambiguous, + and could be interpreted as a separator. This ambiguity is resolved as follows: If the number of separators before TZH in the template string is less than the number of separators before the minus sign in the input string, the minus sign -- 2.7.4