Re: Allow round() function to accept float and double precision - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Allow round() function to accept float and double precision
Date
Msg-id CAKFQuwa50MfAjFzkbQCObHGDWMpu_zjoL2BQWETROZ_YP7eoOw@mail.gmail.com
Whole thread Raw
In response to Re: Allow round() function to accept float and double precision  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Dec 1, 2022 at 7:39 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Dean Rasheed <dean.a.rasheed@gmail.com> writes:

> The fact that passing a negative scale to round() isn't documented
> does seem like an oversight though...

Agreed, will do something about that.


Thanks. I'm a bit surprised you left "Rounds v to s decimal places." alone though.  I feel like the prose should also make clear that positions to the left of the decimal, which are not conventionally considered decimal places, can be identified.

Rounds v at s digits before or after the decimal place.

The examples will hopefully clear up any off-by-one concerns that someone may have.

David J.

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Temporary tables versus wraparound... again
Next
From: Tom Lane
Date:
Subject: Re: Error-safe user functions