postgres.git / summary / log / commit / refs

commit    059e4ee92108c0ecc01cb44a9cd1f00042271f7f
Author:   Bruce Momjian <bruce@momjian.us>
Date:     Wed Sep 06 20:52:24 2023 +0000
First released in: 17.0, 11.22, 12.17, 13.13, 14.10, 15.5, 16.0

    doc:  mention that to_char() values are rounded
    
    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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 7a0d4b9134d..24ad87f9109 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -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>, [parent: aca17fe206a9]