Re: Fix overflow in pg_size_pretty

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Fix overflow in pg_size_pretty
Дата
Msg-id CAApHDvr421-9UK+BKfwKyZxn5XhbTLOJXppnAgkPqpCJQcoCCQ@mail.gmail.com
обсуждение исходный текст
Ответ на Fix overflow in pg_size_pretty  (Joseph Koshakow <koshy44@gmail.com>)
Ответы Re: Fix overflow in pg_size_pretty
Список pgsql-hackers
On Sun, 28 Jul 2024 at 07:18, Joseph Koshakow <koshy44@gmail.com> wrote:
> Attached is a patch that resolves an overflow in pg_size_pretty() that
> resulted in unexpected behavior when PG_INT64_MIN was passed in as an
> argument.

Could we just fix this more simply by assigning the absolute value of
the signed variable into an unsigned type?  It's a bit less code and
gets rid of the explicit test for PG_INT64_MIN.

David

Вложения

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

Предыдущее
От: Andreas Karlsson
Дата:
Сообщение: Re: Speed up collation cache
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: why is pg_upgrade's regression run so slow?