doc: mention that to_char() values are rounded
authorBruce Momjian <bruce@momjian.us>
Wed, 6 Sep 2023 20:52:24 +0000 (16:52 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 6 Sep 2023 20:52:24 +0000 (16:52 -0400)
Reported-by: barsikdacat@gmail.com
Diagnosed-by: Laurenz Albe
Discussion: https://postgr.es/m/168991536429.626.9957835774751337210@wrigleys.postgresql.org

Author: Laurenz Albe

Backpatch-through: 11

doc/src/sgml/func.sgml

index 7a0d4b9134da378bb53e55b0ae50182b58117c97..24ad87f9109c6ca190878661a34d580db0544a83 100644 (file)
@@ -8562,6 +8562,14 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
       </para>
      </listitem>
 
+     <listitem>
+      <para>
+       If the format provides fewer fractional digits than the number being
+       formatted, <function>to_char()</function> will round the number to
+       the specified number of fractional digits.
+      </para>
+     </listitem>
+
      <listitem>
       <para>
        The pattern characters <literal>S</literal>, <literal>L</literal>, <literal>D</literal>,