| От | Tom Lane |
|---|---|
| Тема | Re: new int8 test still has problems |
| Дата | |
| Msg-id | 8364.1223233462@sss.pgh.pa.us обсуждение |
| Ответ на | Re: new int8 test still has problems (Peter Eisentraut <peter_e@gmx.net>) |
| Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes:
> This result from AIX/PPC can't be good, however:
Hmm. The test in int84div is
/* * Overflow check. The only possible overflow case is for arg1 = * INT64_MIN, arg2 = -1, where the
correctresult is -INT64_MIN, which * can't be represented on a two's-complement machine. */ if (arg2 == -1 &&
arg1< 0 && result < 0) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("bigintout of range")));
Maybe we could use "result <= 0" for the third check? Surely a zero
result cannot be correct given the first two checks.
The other integer division functions should be looked at too.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера