Aleksander Machniak wrote: > ceil(0.4) != ceil(4/10) > > It's confusing. Ceil(4/10::numeric) is ok, but in mysql I don't need keep > casting in mind in this case.
The underlying issue is that integer divided by an integer yields an integer, so 4/10 = 0. No, it's not going to be changed in PostgreSQL. You can also write "4.0/10". -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match