Re: [BUGS] BUG #3991: pgsql function sum()

2008-02-26 Thread Zdenek Kotala
I think it is main problem. Try select sum(cast(33.08 as float) - cast(36.09 as float)); you get sum --- -3.010001 Better is to use numeric type if you don't have reason to use float/double. See http://www.postgresql.org/docs/8.3/static/datatype-numeric.html#

Re: [BUGS] BUG #3991: pgsql function sum()

2008-02-26 Thread Tom Lane
"mirek" <[EMAIL PROTECTED]> writes: > problem is in: sum(wvat-wvatp) where field in view wvat = 33.08 and wvatp = > 36.09 > Result is -3.010001 > If I ask postgres manualy: select sum(33.08 - 36.09) > result is ok -3.01 > Now I fix it with round function but i think that is a bug. You

Re: [BUGS] BUG #3991: pgsql function sum()

2008-02-26 Thread Zdenek Kotala
mirek napsal(a): The following bug has been logged online: Bug reference: 3991 Logged by: mirek Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.4 Operating system: Linux fedora(for work) and windows(for development) Description:pgsql function sum() Details:

[BUGS] BUG #3991: pgsql function sum()

2008-02-26 Thread mirek
The following bug has been logged online: Bug reference: 3991 Logged by: mirek Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.4 Operating system: Linux fedora(for work) and windows(for development) Description:pgsql function sum() Details: I saw a very str