Use DECLARE_TOAST_WITH_MACRO() to simplify toast-table declarations.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 40eba064b24d98e343b45ccef6907fe8c9784dc1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2022-04-21T16:02:23Z
Releases: 15.0
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

Files

Discussion