aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2023-09-06 16:52:24 -0400
committerBruce Momjian <bruce@momjian.us>2023-09-06 16:52:24 -0400
commit253bc4eb284b3d3e5fe554f74fcc50ca10e8fd61 (patch)
treefc7dc035f241ae68151c76bf23225f3f67abb3b5
parent3ddc889e334f21c6dc98753dcd8b485b275b5e33 (diff)
downloadpostgresql-253bc4eb284b3d3e5fe554f74fcc50ca10e8fd61.tar.gz
postgresql-253bc4eb284b3d3e5fe554f74fcc50ca10e8fd61.zip
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
-rw-r--r--doc/src/sgml/func.sgml8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index b94827674c9..61f3397f39d 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -8507,6 +8507,14 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
<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>,
and <literal>G</literal> represent the sign, currency symbol, decimal point,
and thousands separator characters defined by the current locale