pgsql: Replace some hard-wired OID constants with corresponding macros.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Replace some hard-wired OID constants with corresponding macros.
Date: 2026-02-08 04:15:49
Message-ID: E1vowD6-001mrE-2w@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Replace some hard-wired OID constants with corresponding macros.

Looking again at commit 7cdb633c8, I wondered why we have hard-wired
"1034" for the OID of type aclitem[]. Some other entries in the same
array have numeric type OIDs as well. This seems to be a hangover
from years ago when not every built-in pg_type entry had an OID macro.
But since we made genbki.pl responsible for generating these macros,
there are macros available for all these array types, so there's no
reason not to follow the project policy of never writing numeric OID
constants in C code.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/73dd7163c5d19f93b629d1ccd9d2a2de6e9667f6

Modified Files
--------------
src/backend/bootstrap/bootstrap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2026-02-08 14:18:53 pgsql: Translation updates
Previous Message Tom Lane 2026-02-08 01:06:02 pgsql: meson: host_system value for Solaris is 'sunos' not 'solaris'.