Re: Use T_IntList for uint32 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Use T_IntList for uint32
Date
Msg-id 26536.1598938035@sss.pgh.pa.us
Whole thread Raw
In response to Re: Use T_IntList for uint32  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Use T_IntList for uint32  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Mon, Aug 31, 2020 at 5:44 PM Ashutosh Bapat
> <ashutosh.bapat.oss@gmail.com> wrote:
>> May be we should have separate list APIs for XID like OID, in case we
>> change underlying datatype of XID in future (unlikely but we have had
>> discussion about 64bit XIDs in the past). Apart from that it helps us
>> track code which deals with XID lists.

> This is a valid point but I think for now I will go with Tom's
> suggestion as the demand for this seems low at this stage. I don't
> want to introduce a new set of APIs just for one use case especially
> when we can work with existing APIs.

I've occasionally wondered about having exactly two physical List
implementations, one for 32-bit payloads and one for 64-bit payloads, and
then putting a trivial macros-or-static-inlines layer in front of that
that uses casts to supply variants for pointers, signed ints, unsigned
ints, etc etc.  There hasn't yet been enough reason to pursue doing it
though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: "cert" + clientcert=verify-ca in pg_hba.conf?
Next
From: Fujii Masao
Date:
Subject: Re: Remove line length restriction in passwordFromFile()