Re: BUG #17128: minimum numeric 'integer' is -2147483647 not -2147483648 as documented
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #17128: minimum numeric 'integer' is -2147483647 not -2147483648 as documented |
| Дата | |
| Msg-id | 1003602.1627658072@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: BUG #17128: minimum numeric 'integer' is -2147483647 not -2147483648 as documented (John Naylor <john.naylor@enterprisedb.com>) |
| Ответы |
Re: BUG #17128: minimum numeric 'integer' is -2147483647 not -2147483648 as documented
|
| Список | pgsql-bugs |
John Naylor <john.naylor@enterprisedb.com> writes:
> On Fri, Jul 30, 2021 at 7:53 AM PG Bug reporting form <
> noreply@postgresql.org> wrote:
>> - if (l < -INT_MAX || l > INT_MAX)
>> + if (l < (-INT_MAX - 1) || l > INT_MAX)
> Yeah, that looks like it should be INT_MIN instead. I'll see about making
> that happen. Thanks for the report!
The whole stanza perhaps ought to be within
#if SIZEOF_LONG > SIZEOF_INT
otherwise some compilers will bleat about useless tests.
(I looked at PGTYPESnumeric_to_long and it seems like it will do
the right thing for 32-bit long, assuming strtol does.)
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера