diff options
author | Bruce Momjian <bruce@momjian.us> | 2019-07-08 23:04:02 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2019-07-08 23:04:02 -0400 |
commit | d0217d5ef2b8c44fa786f7f96c514684a0a04b28 (patch) | |
tree | a42abcc6b12dcd8a1ecf5188cb8ee1337acb9f51 | |
parent | 0d67263563517131c5cf9ba6df46fc2541bc7d9e (diff) | |
download | postgresql-d0217d5ef2b8c44fa786f7f96c514684a0a04b28.tar.gz postgresql-d0217d5ef2b8c44fa786f7f96c514684a0a04b28.zip |
doc: adjust to_timestamp()/to_date() wording
Discussion: https://postgr.es/m/20190706202425.GA16933@telsasoft.com
Author: Justin Pryzby
Backpatch-through: 12
-rw-r--r-- | doc/src/sgml/func.sgml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 8d30090bf25..146c76296ab 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -6444,20 +6444,20 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); </para> <para> If <literal>FX</literal> 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, <literal>to_timestamp('2000/JUN', 'FXYYYY MON')</literal> works, but <literal>to_timestamp('2000/JUN', 'FXYYYY MON')</literal> - returns an error because the second template string space is consumed - by the letter <literal>J</literal> in the input string. + returns an error because the second space in the template string consumes + the letter <literal>J</literal> from the input string. </para> </listitem> <listitem> <para> A <literal>TZH</literal> template pattern can match a signed number. - Without the <literal>FX</literal> option, it can lead to ambiguity in - interpretation of the minus sign, which can also be interpreted as a separator. + Without the <literal>FX</literal> 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 <literal>TZH</literal> in the template string is less than the number of separators before the minus sign in the input string, the minus sign |