Use DECLARE_TOAST_WITH_MACRO() to simplify toast-table declarations.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 21 Apr 2022 16:02:23 +0000 (12:02 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 21 Apr 2022 16:02:23 +0000 (12:02 -0400)
commit40eba064b24d98e343b45ccef6907fe8c9784dc1
tree3037fa3787402527e02e3548fb1a3225af79cc65
parent4eea2202beadbba67638bb129149abe5650aaaf6
Use DECLARE_TOAST_WITH_MACRO() to simplify toast-table declarations.

This is needed so that renumber_oids.pl can handle renumbering
shared catalog declarations, which need to provide C macros for
the OIDs of the shared toast table and index.  The previous
method of writing a C macro separately was error-prone anyway.

Also teach renumber_oids.pl about DECLARE_UNIQUE_INDEX_PKEY,
as we missed doing when inventing that macro.

There are no changes to postgres.bki here, so no need for a
catversion bump.

Discussion: https://postgr.es/m/2995325.1650487527@sss.pgh.pa.us
13 files changed:
src/backend/catalog/Catalog.pm
src/backend/catalog/genbki.pl
src/include/catalog/genbki.h
src/include/catalog/pg_authid.h
src/include/catalog/pg_database.h
src/include/catalog/pg_db_role_setting.h
src/include/catalog/pg_parameter_acl.h
src/include/catalog/pg_replication_origin.h
src/include/catalog/pg_shdescription.h
src/include/catalog/pg_shseclabel.h
src/include/catalog/pg_subscription.h
src/include/catalog/pg_tablespace.h
src/include/catalog/renumber_oids.pl