]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Switch SysCacheIdentifier to a typedef enum
authorMichael Paquier <michael@paquier.xyz>
Wed, 18 Feb 2026 00:58:38 +0000 (09:58 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 18 Feb 2026 00:58:38 +0000 (09:58 +0900)
commitee642cccc43ca1a0ff4a4af2a457208b919af017
tree66bc11bd1cc9f4c6ca27286b535cb07fad109c05
parentc06b5b99bbb0d0e5ddeea9661ec7678e3cf53b4c
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 <tgl@sss.pgh.pa.us>
Author: Andreas Karlsson <andreas@proxel.se>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/289125.1770913057@sss.pgh.pa.us
29 files changed:
contrib/postgres_fdw/connection.c
contrib/postgres_fdw/shippable.c
src/backend/catalog/aclchk.c
src/backend/catalog/dependency.c
src/backend/catalog/genbki.pl
src/backend/catalog/namespace.c
src/backend/catalog/objectaddress.c
src/backend/commands/alter.c
src/backend/commands/extension.c
src/backend/optimizer/util/predtest.c
src/backend/parser/parse_oper.c
src/backend/replication/logical/syncutils.c
src/backend/replication/logical/worker.c
src/backend/replication/pgoutput/pgoutput.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/cache/attoptcache.c
src/backend/utils/cache/evtcache.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/plancache.c
src/backend/utils/cache/spccache.c
src/backend/utils/cache/syscache.c
src/backend/utils/cache/ts_cache.c
src/backend/utils/cache/typcache.c
src/backend/utils/misc/superuser.c
src/include/catalog/objectaddress.h
src/include/replication/worker_internal.h
src/include/utils/inval.h
src/include/utils/syscache.h