Centralize use of PG_INTXX_MIN/MAX for integer limits

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Centralize use of PG_INTXX_MIN/MAX for integer limits
Date: 2018-11-24 12:15:05
Message-ID: 20181124121505.GD16253@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

A couple of years ago, 62e2a8dc has introduced in c.h a set of limits
(to fix some portability issues from 83ff1618) to make the code more
system-independent. Those are for example PG_INT32_MIN, etc. The core
code now mixes the internal PG_ limits with the system ones. Would we
want to unify a bit the whole thing and replace all the SHRT_MIN/MAX,
LONG_MIN/MAX and such with the internal limit definitions?

I suspect that the buildfarm does not have any more members where
sizeof(int) is 2. I am seeing close to 250 places in the core code,
most of them for INT_MIN and INT_MAX.

Thoughts?
--
Michael

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ricardo Martin Gomez 2018-11-24 12:16:10 Re: could not connect to server, in order to operate pgAdmin/PostgreSQL
Previous Message Andrew Gierth 2018-11-24 11:36:37 Re: 64-bit hash function for hstore and citext data type