Re: BUG #3677: ceil/floor not working as expected

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: BUG #3677: ceil/floor not working as expected
Дата
Msg-id 47137270.3060103@enterprisedb.com
обсуждение исходный текст
Ответ на BUG #3677: ceil/floor not working as expected  ("Aleksander Machniak" <alec@alec.pl>)
Список pgsql-bugs
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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Aleksander Machniak"
Дата:
Сообщение: BUG #3677: ceil/floor not working as expected
Следующее
От: "Doug Bedell"
Дата:
Сообщение: BUG #3678: Folder Windows Don't Open Properly