Re: renumber_oids.pl needs some updates

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Subject: Re: renumber_oids.pl needs some updates
Date: 2022-04-20 20:56:53
Message-ID: 2eab924a-9667-d287-5e84-a3c54d5f433e@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20.04.22 22:45, Tom Lane wrote:
> I think the right way to fix #2 is to put the responsibility for
> generating the #define's into genbki.pl, instead of this mistake-prone
> approach of duplicating the OID constants in the source code.
>
> The attached proposed patch invents a variant macro
> DECLARE_TOAST_WITH_MACRO for the relatively small number of cases
> where we need such OID macros.

This makes sense.

A more elaborate (future) project would be to have genbki.pl generate
all of IsSharedRelation(), which is the only place these toast-table-OID
macros are used, AFAICT.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-04-20 21:04:03 Re: [RFC] building postgres with meson -v8
Previous Message Tom Lane 2022-04-20 20:56:22 Re: preserving db/ts/relfilenode OIDs across pg_upgrade (was Re: storing an explicit nonce)