True (?) though I’m guessing the real test for most folks is if printf renders
it as expected. Anything else if icing on the cake, no?
P
--
Paul Ramsey
http://cleverelephant.ca
http://postgis.net
On January 10, 2014 at 1:09:24 PM, Tom Lane (t...@sss.pgh.pa.us) wrote:
to, say, 6 digits produce
Paul Ramsey writes:
> What surprises do you think would come from a
> round(real, integer) returns real
> function?Â
People might expect that rounding to, say, 6 digits produces an exact
decimal answer. Even if you're not exceeding 6 digits overall, it's
unlikely that the answer is *exact*, if
What surprises do you think would come from a
round(real, integer) returns real
function?
Just asking the question, I guess I can see the answer, since though round() is
usually used to reduce precision, it’s also possible to use it to increase it
arbitrarily… bah.
It does bug me a fair bit,
Paul Ramsey writes:
> History question:
> Why does select round(3,3) work,Â
> Â Â Â Â Â select round(3.0,3) work,Â
> but    select round(3.0::real,1) not work?
The 2-argument round() function actually takes (numeric, integer).
There's an implicit cast from int to numeric, but not an i