Allow round() function to accept float and double precision

Sayyid Ali Sajjad Rizavi <sasrizavi@gmail.com>

From: Sayyid Ali Sajjad Rizavi <sasrizavi@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2022-11-30T18:38:46Z
Lists: pgsql-hackers
Whenever rounding a number to a fixed number of decimal points in a
calculation, we need to cast the number into a numeric before using
round((col1/100.0)::numeric, 2).

It would be convenient for everyone if round() also accepts float and
double precision.

Is this something I could work with? And is that feasible?

Commits

  1. Doc: add example of round(v, s) with negative s.