round(real,integer) - Mailing list pgsql-general

From Paul Ramsey
Subject round(real,integer)
Date
Msg-id etPan.52d053b5.6b68079a.125ef@Butterfly.local
Whole thread Raw
Responses Re: round(real,integer)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
History question:
Why does select round(3,3) work, 
         select round(3.0,3) work, 
but      select round(3.0::real,1) not work?

There's a utility cast in the integer case (described here
http://www.postgresql.org/docs/9.3/static/typeconv-func.html),but not in the real case. 
Is this on purpose, or just an oversight? 
Obviously one can work around it, but I'm sick of doing so, it makes my SQL examples ugly. I’d like to fix it, but not
ifthere’s a reason it’s not supposed to be done. 
P.

--
Paul Ramsey
http://cleverelephant.ca
http://postgis.net




pgsql-general by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: Question about memory usage
Next
From: Preston Hagar
Date:
Subject: Re: Question about memory usage