Re: int8 & INT64_IS_BUSTED
От
Tom Lane
Тема
Re: int8 & INT64_IS_BUSTED
Дата
Msg-id
12853.1188429713@sss.pgh.pa.us
Ответ на
Re: int8 & INT64_IS_BUSTED (Florian G. Pflug)
Список
Дерево обсуждения
int8 & INT64_IS_BUSTED "Florian G. Pflug" <fgp@phlo.org>
Re: int8 & INT64_IS_BUSTED Neil Conway <neilc@samurai.com>
Re: int8 & INT64_IS_BUSTED Tom Lane <tgl@sss.pgh.pa.us>
Re: int8 & INT64_IS_BUSTED "Florian G. Pflug" <fgp@phlo.org>
Re: int8 & INT64_IS_BUSTED Tom Lane <tgl@sss.pgh.pa.us>
"Florian G. Pflug" writes: > I still think int8mul is buggy. It calculates result as arg1 * arg2, and then > checks for an overflow by dividing again, and seeing if the right answer > comes out. Which sounds good. But it *skips* that check if both arguments > fit into an int32 - check is > (arg1 == (int64) ((int32) arg1) && arg2 == (int64) ((int32) arg2)). Good point --- we should probably #ifdef out that part for INT64_IS_BUSTED. regards, tom lane
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата: