pgsql: Use DECLARE_TOAST_WITH_MACRO() to simplify toast-table declarati

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use DECLARE_TOAST_WITH_MACRO() to simplify toast-table declarati
Date: 2022-04-21 16:02:31
Message-ID: E1nhZGI-000S0S-KA@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/40eba064b24d98e343b45ccef6907fe8c9784dc1

Modified Files
--------------
src/backend/catalog/Catalog.pm | 11 +++++++++++
src/backend/catalog/genbki.pl | 10 ++++++++++
src/include/catalog/genbki.h | 6 +++++-
src/include/catalog/pg_authid.h | 4 +---
src/include/catalog/pg_database.h | 4 +---
src/include/catalog/pg_db_role_setting.h | 4 +---
src/include/catalog/pg_parameter_acl.h | 4 +---
src/include/catalog/pg_replication_origin.h | 4 +---
src/include/catalog/pg_shdescription.h | 4 +---
src/include/catalog/pg_shseclabel.h | 4 +---
src/include/catalog/pg_subscription.h | 4 +---
src/include/catalog/pg_tablespace.h | 4 +---
src/include/catalog/renumber_oids.pl | 27 +++++++++++++++++++++++----
13 files changed, 58 insertions(+), 32 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2022-04-21 17:03:19 pgsql: CREATE PUBLICATION ref: Minor tweaks to row filters
Previous Message Andrew Dunstan 2022-04-21 13:41:50 pgsql: Support new perl module namespace in stable branches