From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove special BKI_LOOKUP magic for namespace and role OIDs.
Date: Wed, 03 Feb 2021 17:01:58 +0000
Message-ID: <E1l7LXS-0007sJ-Nn@gemulon.postgresql.org> (raw)
Remove special BKI_LOOKUP magic for namespace and role OIDs.
Now that commit 62f34097c attached BKI_LOOKUP annotation to all the
namespace and role OID columns in the catalogs, there's no real reason
to have the magic PGNSP and PGUID symbols. Get rid of them in favor
of implementing those lookups according to genbki.pl's normal pattern.
This means that in the catalog headers, BKI_DEFAULT(PGNSP) becomes
BKI_DEFAULT(pg_catalog), which seems a lot more transparent.
BKI_DEFAULT(PGUID) becomes BKI_DEFAULT(POSTGRES), which is perhaps
less so; but you can look into pg_authid.dat to discover that
POSTGRES is the nonce name for the bootstrap superuser.
This change also means that if we ever need cross-references in the
initial catalog data to any of the other built-in roles besides
POSTGRES, or to some other built-in schema besides pg_catalog,
we can just do it.
No catversion bump here, as there's no actual change in the contents
of postgres.bki.
Discussion: https://postgr.es/m/3240355.1612129197@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ba0faf81c65ac99dd42ce192f3257d4d2231ea50
Modified Files
--------------
doc/src/sgml/bki.sgml | 11 -----------
src/backend/catalog/genbki.pl | 24 ++++++++++--------------
src/include/catalog/pg_authid.dat | 4 ++++
src/include/catalog/pg_class.h | 4 ++--
src/include/catalog/pg_collation.h | 9 ++++++---
src/include/catalog/pg_conversion.h | 4 ++--
src/include/catalog/pg_database.h | 2 +-
src/include/catalog/pg_language.h | 2 +-
src/include/catalog/pg_namespace.h | 2 +-
src/include/catalog/pg_opclass.h | 4 ++--
src/include/catalog/pg_operator.h | 4 ++--
src/include/catalog/pg_opfamily.h | 4 ++--
src/include/catalog/pg_proc.h | 4 ++--
src/include/catalog/pg_tablespace.h | 4 +++-
src/include/catalog/pg_ts_config.h | 4 ++--
src/include/catalog/pg_ts_dict.h | 4 ++--
src/include/catalog/pg_ts_parser.h | 2 +-
src/include/catalog/pg_ts_template.h | 2 +-
src/include/catalog/pg_type.h | 4 ++--
19 files changed, 46 insertions(+), 52 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Remove special BKI_LOOKUP magic for namespace and role OIDs.
In-Reply-To: <E1l7LXS-0007sJ-Nn@gemulon.postgresql.org>
References: <E1l7LXS-0007sJ-Nn@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox