Allow round() function to accept float and double precision

From: Sayyid Ali Sajjad Rizavi <sasrizavi(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Allow round() function to accept float and double precision
Date: 2022-11-30 18:38:46
Message-ID: CAHxW8BAZZAw85E+hzXMN5wY8jba6LXsJ3ddjDaYSd27oMRiv4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sayyid Ali Sajjad Rizavi 2022-11-30 18:53:13 Re: Enable pg_stat_statements extension for limited statements only
Previous Message Justin Pryzby 2022-11-30 18:33:59 Re: Tests for psql \g and \o