Re: When is int32 not an int32?

Поиск
Список
Период
Сортировка
От 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?  ("David E. Wheeler" <david@justatheory.com>)
Список 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 по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: When is int32 not an int32?
Следующее
От: Tatsuro Yamada
Дата:
Сообщение: Add prefix pg_catalog to pg_get_statisticsobjdef_columns() in describe.c (\dX)