The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/bug-reporting.html
Description:
I think the manual's description of the round function with numeric as an
argument is different from the actual behavior.
manual
https://www.postgresql.org/docs/15/functions-math.html
Explanation of the manual's ROUND function
round ( numeric ) → numeric
round ( double precision ) → double precision
Rounds to nearest integer. For numeric, ties are broken by rounding away
from zero. For double precision, the tie-breaking behavior is platform
dependent, but “round to nearest even” is the most common rule.
round(42.4) → 42
Operation of the ROUND function
postgres=# SELECT round(CAST(42.5 AS numeric));
round
-------
43
(1 row)
I am thinking that the value of the ROUND function with NUMERIC as an
argument is rounded off, not rounded away from zero.