Re: unused_oids script is broken with bsd sed

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Naylor <jcnaylor@gmail.com>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, Stas Kelvich <s.kelvich@postgrespro.ru>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-04-25T18:26:35Z
Lists: pgsql-hackers
John Naylor <jcnaylor@gmail.com> writes:
> On 4/25/18, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think we should rewrite
>> both of them to use the Catalog.pm infrastructure.

> If we're going to use Catalog.pm for that, it seems more convenient to
> expose toast and index oids directly rather than in strings formatted
> specifically for the bki file, as in the attached. Thoughts?

Good idea, I like this better than what Stas did in his patch.

I'm a bit inclined to preserve the old variable names (toast_name,
toast_oid etc) as the hash keys because they seem more greppable
than the generic "oid", "name" that you have here.  But maybe that
isn't an interesting consideration.

			regards, tom lane


Commits

  1. Blindly try to fix MSVC build's use of genbki.pl and Gen_fmgrtab.pl.

  2. Avoid overwriting unchanged output files in genbki.pl and Gen_fmgrtab.pl.

  3. Rearrange makefile rules for running Gen_fmgrtab.pl.

  4. Avoid parsing catalog data twice during BKI file construction.

  5. Fix duplicate_oids and unused_oids so user needn't cd to catalog dir.

  6. Convert unused_oids and duplicate_oids to use Catalog.pm infrastructure.

  7. Make Catalog.pm's representation of toast and index decls more abstract.