1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-18 05:01:01 +03:00

to_number(): allow 'V' to divide by 10^(the number of digits)

to_char('V') already multiplied in a similar manner.

Report by Jeremy Lowery
This commit is contained in:
Bruce Momjian
2015-10-05 21:03:38 -04:00
parent 2145a76604
commit 28b3a3d41a
2 changed files with 23 additions and 4 deletions

View File

@@ -6152,12 +6152,14 @@ SELECT regexp_matches('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
<listitem>
<para>
<literal>V</literal> effectively
<literal>V</literal> with <function>to_char</function>
multiplies the input values by
<literal>10^<replaceable>n</replaceable></literal>, where
<replaceable>n</replaceable> is the number of digits following
<literal>V</literal>.
<function>to_char</function> does not support the use of
<literal>V</literal>. <literal>V</literal> with
<function>to_number</function> divides in a similar manner.
<function>to_char</function> and <function>to_number</function>
do not support the use of
<literal>V</literal> combined with a decimal point
(e.g., <literal>99.9V99</literal> is not allowed).
</para>