Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier
Date
Msg-id 4653b0bf-5642-44f1-b059-7cc1db861da7@proxel.se
Whole thread Raw
In response to Our ABI diff infrastructure ignores enum SysCacheIdentifier  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier
List pgsql-hackers
On 2/12/26 5:17 PM, Tom Lane wrote:
> As for SysCacheIdentifier, the root of the problem is that
> SearchSysCache and friends are declared to take "int cacheId"
> not "enum SysCacheIdentifier cacheId".  Likely we should change
> that in HEAD, but that'd be an actual not theoretical ABI break
> (the enum's not necessarily int-width).  In the back branches
> I'm thinking about adding a dummy function just for this purpose,
> more or less as in the under-commented patch attached.
> 
> Thoughts?

Attached a patch which changes that in HEAD and I think for HEAD the 
best solution is the just fix all cases where we use ints like this to 
actually use the enum.

As for back branches I agree with Michael, just add a comment explaining 
why this dummy function is necessary.

Andreas

Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: [PATCH] Support automatic sequence replication
Next
From: Andreas Karlsson
Date:
Subject: Re: Incremental View Maintenance, take 2