Re: Use T_IntList for uint32
От | Amit Kapila |
---|---|
Тема | Re: Use T_IntList for uint32 |
Дата | |
Msg-id | CAA4eK1L9DseQhgF6kcbzTGsijigrndwaCtoNk+JbfDDkVQ6dFA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Use T_IntList for uint32 (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Mon, Aug 31, 2020 at 6:58 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > 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.) > I agree with this and I also don't want to add more code for this unless it is really required. Having said that, the case for Xids is similar to Oids where someday we might want it to be 64-bit but we can leave it for another day. > The code you quote probably ought to be casting the result of lfirst_int > to uint32, but I see no reason to work harder. > Sounds reasonable, will use this for now. -- With Regards, Amit Kapila.
В списке pgsql-hackers по дате отправления: