]> granicus.if.org Git - postgresql/commit
Convert unused_oids and duplicate_oids to use Catalog.pm infrastructure.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Apr 2018 20:01:47 +0000 (16:01 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Apr 2018 20:01:58 +0000 (16:01 -0400)
commit5602265f770f400a03b4a4ca22b3cd530c294bc2
tree07b0a64f2c3d7b18f341b7ed3518d0da972e8c5e
parent1eb3a09e93d28765fcf42c703c4c7322ad2686d7
Convert unused_oids and duplicate_oids to use Catalog.pm infrastructure.

unused_oids was previously a shell script, which of course didn't work at
all on Windows.  Also, commit 372728b0d introduced some other portability
problems, as complained of by Stas Kelvich.  We can improve matters by
converting it to Perl.

While we're at it, let's future-proof both this script and duplicate_oids
to use Catalog.pm rather than having a bunch of ad-hoc logic for parsing
catalog headers and .dat files.  These scripts are thereby a bit slower,
which doesn't seem like a problem for typical manual use.  It is a little
annoying for buildfarm purposes, but we should be able to fix that case
by having genbki.pl make the check instead of parsing the headers twice.
(That's not done in this commit, though.)

Stas Kelvich, adjusted a bit by me

Discussion: https://postgr.es/m/37D774E4-FE1F-437E-B3D2-593F314B7505@postgrespro.ru
src/backend/catalog/Catalog.pm
src/include/catalog/duplicate_oids
src/include/catalog/unused_oids