Use DECLARE_TOAST_WITH_MACRO() to simplify toast-table declarations.
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/Catalog.pm | modified | +11 −0 |
| src/backend/catalog/genbki.pl | modified | +10 −0 |
| src/include/catalog/genbki.h | modified | +5 −1 |
| src/include/catalog/pg_authid.h | modified | +1 −3 |
| src/include/catalog/pg_database.h | modified | +1 −3 |
| src/include/catalog/pg_db_role_setting.h | modified | +1 −3 |
| src/include/catalog/pg_parameter_acl.h | modified | +1 −3 |
| src/include/catalog/pg_replication_origin.h | modified | +1 −3 |
| src/include/catalog/pg_shdescription.h | modified | +1 −3 |
| src/include/catalog/pg_shseclabel.h | modified | +1 −3 |
| src/include/catalog/pg_subscription.h | modified | +1 −3 |
| src/include/catalog/pg_tablespace.h | modified | +1 −3 |
| src/include/catalog/renumber_oids.pl | modified | +23 −4 |
Discussion
- renumber_oids.pl needs some updates 3 messages · 2022-04-20