pgsql: Don't require pg_class.dat to contain correct relnatts values.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Don't require pg_class.dat to contain correct relnatts values.
Дата
Msg-id E1j33aW-0001gm-Oe@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Don't require pg_class.dat to contain correct relnatts values.

Practically everybody who's ever added a column to one of the bootstrap
catalogs has been burnt by the need to update the relnatts field in the
initial pg_class data to match.  Now that we use Perl scripts to
generate postgres.bki, we can have the machines take care of that,
by filling the field during genbki.pl.

While at it, use the BKI_DEFAULTS mechanism to eliminate repetitive
specifications of other column values in pg_class.dat, too.  They
weren't particularly a maintenance problem, but this way is prettier
(certainly the spotty previous usage of BKI_DEFAULTS wasn't pretty).

No catversion bump needed, since this doesn't actually change the
contents of postgres.bki.

Per gripe from Justin Pryzby, though this is quite different from
his originally proposed solution.

Amit Langote, John Naylor, Tom Lane

Discussion: https://postgr.es/m/20200212182337.GZ1412@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/86ff085e83888e2e359620fc326608a674423308

Modified Files
--------------
src/backend/catalog/genbki.pl    |  9 +++++++
src/include/catalog/pg_class.dat | 46 ++++------------------------------
src/include/catalog/pg_class.h   | 53 +++++++++++++++++++++-------------------
3 files changed, 42 insertions(+), 66 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: pgsql: Recreate website's formatting for "website" doc builds.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Clarify coding in Catalog::AddDefaultValues.