Re: Missing PG_INT32_MIN in numutils.c

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Missing PG_INT32_MIN in numutils.c
Дата
Msg-id CA+TgmobyH58vz9noKmk5j-n=ZGttn_xL=k9OztLvYZRPYBCdsA@mail.gmail.com
обсуждение исходный текст
Ответ на Missing PG_INT32_MIN in numutils.c  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Missing PG_INT32_MIN in numutils.c  (Michael Paquier <michael.paquier@gmail.com>)
Re: Missing PG_INT32_MIN in numutils.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Apr 13, 2016 at 3:49 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> Hi all,
>
> While going through numutils.c I found the following thing:
> --- a/src/backend/utils/adt/numutils.c
> +++ b/src/backend/utils/adt/numutils.c
> @@ -136,7 +136,7 @@ pg_ltoa(int32 value, char *a)
>      * Avoid problems with the most negative integer not being representable
>      * as a positive integer.
>      */
> -   if (value == (-2147483647 - 1))
> +   if (value == PG_INT32_MIN)
>     {
>         memcpy(a, "-2147483648", 12);
>         return;
> Attached is a patch. The interesting part is that pg_lltoa is not
> missing the check on PG_INT64_MIN.

Committed.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Move PinBuffer and UnpinBuffer to atomics
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Why doesn't src/backend/port/win32/socket.c implement bind()?