"Gaietti, Mauro \(SELEX GALILEO Guest, Italy\)"
writes:
> I think this is not consistent with documentation that says there is
> just one round function, with one argument of numeric type.
The documentation you're quoting says there is just one round function
that takes *two* arguments. Which i
marzo 2010 18.44
A: Tom Lane
Cc: Gaietti, Mauro (SELEX GALILEO Guest, Italy); pgsql-general@postgresql.org
Oggetto: Re: [GENERAL] round(x) function
On 3/26/2010 12:12 PM, Tom Lane wrote:
> "Gaietti, Mauro \(SELEX GALILEO Guest,
> Italy\)" writes:
>
>> This query:
>
On 3/26/2010 12:12 PM, Tom Lane wrote:
> "Gaietti, Mauro \(SELEX GALILEO Guest,
> Italy\)" writes:
>
>> This query:
>> select round(0.5), round(0.5::integer), round(0.5::bigint), round(
>> 0.5::float ), round( 0.5::double precision ),round(cast(0.5 as double
>> precision )),round(cast(0.5::do
"Gaietti, Mauro \(SELEX GALILEO Guest, Italy\)"
writes:
> This query:
> select round(0.5), round(0.5::integer), round(0.5::bigint), round(
> 0.5::float ), round( 0.5::double precision ),round(cast(0.5 as double
> precision )),round(cast(0.5::double precision as numeric )); has strange
> result:
This query:
select round(0.5), round(0.5::integer), round(0.5::bigint), round(
0.5::float ), round( 0.5::double precision ),round(cast(0.5 as double
precision )),round(cast(0.5::double precision as numeric )); has strange
result:
1 1 1 0 0 0 1
Is this correct?
My expected result is
1 1 1 1 1