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

From Tom Lane
Subject Re: Use T_IntList for uint32
Date
Msg-id 3955127.1598880523@sss.pgh.pa.us
Whole thread Raw
In response to Use T_IntList for uint32  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Use T_IntList for uint32  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> Currently pg_list.h doesn't have a variant for uint32 list (like
> T_UIntList), is there a reason other than that that we don't need it
> till now?

I'm not in favor of adding another list variant code just for that;
the overhead is nonzero, and the gain negligible.  (I think the reason
we have OID lists is the idea that someday we'd want to make OID 64-bit.
A list type defined as "UInt" would offer no such future-proofing.)

The code you quote probably ought to be casting the result of lfirst_int
to uint32, but I see no reason to work harder.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Ideas about a better API for postgres_fdw remote estimates
Next
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions