pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Teach genbki.pl to auto-generate pg_type entries for array types
Date: Thu, 20 Sep 2018 19:14:55 +0000
Message-ID: <E1g34Pf-0003Oq-WA@gemulon.postgresql.org> (raw)

Teach genbki.pl to auto-generate pg_type entries for array types.

This eliminates some more tedium in adding new catalog entries,
specifically the need to set up an array type when adding a new
built-in data type.  Now it's sufficient to assign an OID for the
array type and write it in an "array_type_oid" metadata field.
You don't have to fill the base type's typarray link explicitly, either.

No catversion bump since the contents of pg_type aren't changed.
(Well, their order might be different, but that doesn't matter.)

John Naylor, reviewed and whacked around a bit by
Dagfinn Ilmari Mannsåker, and some more by me.

Discussion: https://postgr.es/m/CAJVSVGVTb6m9pJF49b3SuA8J+T-THO9c0hxOmoyv-yGKh-FbNg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3dc820c43e427371b66d217f2bd5481fc9ef2e2d

Modified Files
--------------
doc/src/sgml/bki.sgml                    |  52 +-
src/backend/catalog/Catalog.pm           |  78 ++-
src/backend/catalog/genbki.pl            |   2 +
src/include/catalog/genbki.h             |   2 +
src/include/catalog/pg_type.dat          | 864 +++++++++----------------------
src/include/catalog/pg_type.h            |  30 +-
src/include/catalog/reformat_dat_file.pl |  29 +-
7 files changed, 415 insertions(+), 642 deletions(-)



Message-ID: <E1g34Pf-0003Oq-WA@gemulon.postgresql.org>
Permalink:  ../E1g34Pf-0003Oq-WA@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1g34Pf-0003Oq-WA@gemulon.postgresql.org

 · 

reply

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: Teach genbki.pl to auto-generate pg_type entries for array types
  In-Reply-To: <E1g34Pf-0003Oq-WA@gemulon.postgresql.org>
  References: <E1g34Pf-0003Oq-WA@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