| От | Tom Lane |
|---|---|
| Тема | Re: When is int32 not an int32? |
| Дата | |
| Msg-id | 2671909.1632698725@sss.pgh.pa.us обсуждение |
| Ответ на | Re: When is int32 not an int32? ("David E. Wheeler" <david@justatheory.com>) |
| Ответы |
Re: When is int32 not an int32?
|
| Список | pgsql-hackers |
"David E. Wheeler" <david@justatheory.com> writes:
> On Sep 26, 2021, at 18:31, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'd bet more along the lines of "your overflow check is less portable than
>> you thought”.
> Oh well now that you mention it and I look past things, I see we’re using INT_MAX, but should probably use INT32_MAX.
More to the point, you should be checking whether strtol reports overflow.
Having now seen your code, I'll opine that the failing platforms have
32-bit long.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера