Patch: Remove all declarations from pg_attribute.h, consolidate BKI scripts
John Naylor <jcnaylor@gmail.com>
From: John Naylor <jcnaylor@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2009-12-21T00:20:53Z
Lists: pgsql-hackers
Attachments
- bki_revamp_v1.patch (text/x-patch) patch v1
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