Re: R: [GENERAL] round(x) function

2010-03-26 Thread Tom Lane
"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

R: [GENERAL] round(x) function

2010-03-26 Thread Gaietti, Mauro (SELEX GALILEO Guest, Italy)
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: >

Re: [GENERAL] round(x) function

2010-03-26 Thread Justin Graf
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

Re: [GENERAL] round(x) function

2010-03-26 Thread Tom Lane
"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:

[GENERAL] round(x) function

2010-03-26 Thread Gaietti, Mauro (SELEX GALILEO Guest, Italy)
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