Add concept of invalid value to SysCacheIdentifier
Michael Paquier <michael@paquier.xyz>
Add concept of invalid value to SysCacheIdentifier This commit tweaks the generation of the syscache IDs for the enum SysCacheIdentifier to now include an invalid value, with -1 assigned as value. The concept of an invalid syscache ID exists when handling lookups of a ObjectAddress, based on their set of properties in ObjectPropertyType. -1 is used for the case where an object type has no option for a syscache lookup. This has been found as independently useful while discussing a switch of SysCacheIdentifier to a typedef, as we already have places that want to know about the concept of an invalid value when dealing with ObjectAddresses. Reviewed-by: Andreas Karlsson <andreas@proxel.se> Discussion: https://postgr.es/m/aZQRnmp9nVjtxAHS@paquier.xyz
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/aclchk.c | modified | +1 −1 |
| src/backend/catalog/genbki.pl | modified | +9 −2 |
| src/backend/catalog/objectaddress.c | modified | +31 −31 |
Discussion
- Our ABI diff infrastructure ignores enum SysCacheIdentifier 16 messages · 2026-02-12 → 2026-04-08