Re: [COMMITTERS] pgsql: Define integer limits independently from the system definitions.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [COMMITTERS] pgsql: Define integer limits independently from the system definitions.
Дата
Msg-id CAB7nPqTwN+HFUfZNMMJuWL6TquWEoVtfutvAQN9HMKOGYDUrTw@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi Andres,

On Fri, Apr 3, 2015 at 12:45 AM, Andres Freund <andres@anarazel.de> wrote:
Define integer limits independently from the system definitions.

In 83ff1618 we defined integer limits iff they're not provided by the
system. That turns out not to be the greatest idea because there's
different ways some datatypes can be represented. E.g. on OSX PG's 64bit
datatype will be a 'long int', but OSX unconditionally uses 'long
long'. That disparity then can lead to warnings, e.g. around printf
formats.

This commit has added PG_INT16_MIN/MAX, however we still rely on SHRT_MIN and SHRT_MAX in some code paths. On all the platforms I looked at (OpenBSD, FreeBSD, MinGW, MSVC, OSX, Linux, Solaris) SHRT_MIN and SHRT_MAX definitions are always the same. Still, shouldn't we replace SHRT_* by their equivalent PG_INT16_* to be completely independent? I am just wondering if you considered that.
Regards,
--
Michael

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_restore cancel TODO
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_restore cancel TODO