From: Bruce Momjian Date: Wed, 6 Sep 2023 20:52:24 +0000 (-0400) Subject: doc: mention that to_char() values are rounded X-Git-Tag: REL_11_22~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=69e22dd38faf0641f27544dc06a7ac25b9682533;p=thirdparty%2Fpostgresql.git 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 --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 950f5086de7..fe58fa55242 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -6580,6 +6580,14 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); + + + If the format provides fewer fractional digits than the number being + formatted, to_char() will round the number to + the specified number of fractional digits. + + + The pattern characters S, L, D,