diff options
author | Bruce Momjian <bruce@momjian.us> | 2023-09-06 16:52:24 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2023-09-06 16:52:24 -0400 |
commit | 059e4ee92108c0ecc01cb44a9cd1f00042271f7f (patch) | |
tree | d113dd69ef1ec9efb10f10cd833074871b17580b /doc/src | |
parent | aca17fe206a9b8b73ec76f10a3256f1bf019e1a6 (diff) | |
download | postgresql-059e4ee92108c0ecc01cb44a9cd1f00042271f7f.tar.gz postgresql-059e4ee92108c0ecc01cb44a9cd1f00042271f7f.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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ -8564,6 +8564,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 |