I was working on an extension [1] that needed to manage a list of query IDs. Query ID is internally of type uint64 (struct Query's member named queryId), but it is exposed to the SQL layer as signed int64 (e.g pg_stat_activity.query_id is of type bigint).
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. I am not sure if there are any candidates in Postgres core that'd benefit from this, but it sure would've helped when I was developing the extension. Please see attached a minimal patch that I developed while developing my extension. By no means is the patch complete, but if there's interest in list API for int64 type, I can complete the patch and make the new API match the current API for int type. [1]: pg_block_queries https://github.com/gurjeet/pg_block_queries/ Best regards, Gurjeet http://Gurje.et
int64_list_api.patch
Description: Binary data