Patch: Remove all declarations from pg_attribute.h, consolidate BKI scripts - Mailing list pgsql-hackers

From John Naylor
Subject Patch: Remove all declarations from pg_attribute.h, consolidate BKI scripts
Date
Msg-id 4d191a530912201620m736156e3jda02217c0d3b6599@mail.gmail.com
Whole thread Raw
Responses Re: Patch: Remove all declarations from pg_attribute.h, consolidate BKI scripts  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Greetings,

Following up on my experimental patch last month to revamp the BKI
infrastructure, I am proposing a less invasive set of changes with the
hope of offering something committable. Some of these were discussed
by Robert Haas and others last summer.

1. Remove all DATA() declarations from pg_attribute.h, since they are
easily generated. Introduce a new BKI pseudo-command
BKI_NAILED_IN_CACHE, which indicates that relcache.c needs a
Schema_pg_foo declaration for that catalog. Place these declarations
in a new header schemapg.h. This will reduce the effort to add or
change critical tables.

2. Use identical scripts on Posix and Windows systems, using Perl 5.6
(no CPAN modules needed). The grepping of the catalog headers is done
by Catalog.pm, which gives the scripts gen_bki.pl and gen_fmgr.pl a
structured interface to the data. The pg_type info is saved so that
the relevant fields can be copied into those of pg_attribute.

3. Make the BKI files, fmgrtab.c, fmgroids.h, and schemapg.h distprep
targets, so distribution tarballs can still be built without Perl on
Posix systems.

Feedback on the Makefile changes would be appreciated, since that was
the hardest part for me. The MSVC changes are untested.

John Naylor

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: alpha3 release schedule?
Next
From: KaiGai Kohei
Date:
Subject: Re: Largeobject Access Controls (r2460)