doc: mention that to_char() values are rounded
authorBruce Momjian <[email protected]>
Wed, 6 Sep 2023 20:52:24 +0000 (16:52 -0400)
committerBruce Momjian <[email protected]>
Wed, 6 Sep 2023 20:52:24 +0000 (16:52 -0400)
Reported-by: [email protected]
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 42f02268c94076a2bcf054fab1990b9851a5f42e..bae5c676cf805956a0298c022756a7c39d82b6ea 100644 (file)
@@ -7899,6 +7899,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>,