Re: int64 support in List API - Mailing list pgsql-hackers

From Tom Lane
Subject Re: int64 support in List API
Date
Msg-id 2914734.1737347790@sss.pgh.pa.us
Whole thread Raw
Responses Re: int64 support in List API
List pgsql-hackers
Gurjeet Singh <gurjeet@singh.im> writes:
> I wanted to use the list api from pg_list.h. It has special implementations for
> int, oid, pointer, and xid types, which help with lower code overhead (no need
> to create structures whose sole member is of one of these types) and  better
> performance. So I was wondering if there's any interest in having a similar API
> for int64 type, as well.

This has been discussed before, and we've felt that it wasn't worth
the additional code duplication.  I would not favor approaching this
with the mindset of lets-copy-and-paste-all-the-code.

However: it might be interesting to think about having just two
underlying implementations, one for 32-bit datums and one for 64-bits,
with the existing APIs becoming macros-with-casts wrappers around the
appropriate one of those.  That line of attack might lead to
physically less code not more.  The devil's in the details though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Skip collecting decoded changes of already-aborted transactions
Next
From: Yura Sokolov
Date:
Subject: Re: int64 support in List API