Switch SysCacheIdentifier to a typedef enum The main purpose of this change is to allow an ABI checker to understand when the list of SysCacheIdentifier changes, by switching all the routine declarations that relied on a signed integer for a syscache ID to this new type. This is going to be useful in the long-term for versions newer than v19 so as we will be able to check when the list of values in SysCacheIdentifier is updated in a non-ABI compliant fashion.
Most of the changes of this commit are due to the new definition of SyscacheCallbackFunction, where a SysCacheIdentifier is now required for the syscache ID. It is a mechanical change, still slightly invasive. There are more areas in the tree that could be improved with an ABI checker in mind; this takes care of only one area. Reported-by: Tom Lane <[email protected]> Author: Andreas Karlsson <[email protected]> Reviewed-by: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ee642cccc43ca1a0ff4a4af2a457208b919af017 Modified Files -------------- contrib/postgres_fdw/connection.c | 5 +++-- contrib/postgres_fdw/shippable.c | 3 ++- src/backend/catalog/aclchk.c | 10 ++++----- src/backend/catalog/dependency.c | 2 +- src/backend/catalog/genbki.pl | 4 ++-- src/backend/catalog/namespace.c | 5 +++-- src/backend/catalog/objectaddress.c | 17 ++++++++------- src/backend/commands/alter.c | 8 +++---- src/backend/commands/extension.c | 5 +++-- src/backend/optimizer/util/predtest.c | 6 +++-- src/backend/parser/parse_oper.c | 6 +++-- src/backend/replication/logical/syncutils.c | 3 ++- src/backend/replication/logical/worker.c | 2 +- src/backend/replication/pgoutput/pgoutput.c | 10 +++++---- src/backend/utils/adt/acl.c | 6 +++-- src/backend/utils/adt/ri_triggers.c | 6 +++-- src/backend/utils/cache/attoptcache.c | 3 ++- src/backend/utils/cache/evtcache.c | 6 +++-- src/backend/utils/cache/inval.c | 4 ++-- src/backend/utils/cache/plancache.c | 10 +++++---- src/backend/utils/cache/spccache.c | 3 ++- src/backend/utils/cache/syscache.c | 34 ++++++++++++++--------------- src/backend/utils/cache/ts_cache.c | 2 +- src/backend/utils/cache/typcache.c | 15 ++++++++----- src/backend/utils/misc/superuser.c | 5 +++-- src/include/catalog/objectaddress.h | 5 +++-- src/include/replication/worker_internal.h | 3 ++- src/include/utils/inval.h | 8 ++++--- src/include/utils/syscache.h | 30 ++++++++++++------------- 29 files changed, 128 insertions(+), 98 deletions(-)
