Patch: Remove all declarations from pg_attribute.h, consolidate BKI scripts

From: John Naylor <jcnaylor(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Patch: Remove all declarations from pg_attribute.h, consolidate BKI scripts
Date: 2009-12-21 00:20:53
Message-ID: 4d191a530912201620m736156e3jda02217c0d3b6599@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
bki_revamp_v1.patch text/x-patch 143.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2009-12-21 00:39:38 Re: Largeobject Access Controls (r2460)
Previous Message Robert Haas 2009-12-21 00:11:08 Re: alpha3 release schedule?