bug in function strtoint, on Windows OS won't report ERANGE

Поиск
Список
Период
Сортировка
От Miron Berlin
Тема bug in function strtoint, on Windows OS won't report ERANGE
Дата
Msg-id DM4P223MB0518D09B523522F099A97E2CC0222@DM4P223MB0518.NAMP223.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы Re: bug in function strtoint, on Windows OS won't report ERANGE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Dear Postgres Dev Team,


Functionstrtoint has a bug. It would not report ERANGE on Windows OS compiled with Microsoft Visual Studio compiler.
To work correctly please replace call to strtol with call to strtoll ( please note two letters l on the right hand side ).
This function should produce correct data type on all available platforms.
In addition, please modify type of the variable val declared at the top of the function from long to an portable 64 bit long integer.
For example long long.

Please note, an substitution of function strtoint with strtol sets errno as expected on Windows platform.
Please note, fixing this bug may have wide impact due to frequent use of function strtoint in various lexer(s).

Thanks,

Miron


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tender Wang
Дата:
Сообщение: Re: BUG #18314: PARALLEL UNSAFE function does not prevent parallel index build
Следующее
От: jian he
Дата:
Сообщение: Re: BUG #18314: PARALLEL UNSAFE function does not prevent parallel index build