Andres Freund <andres@2ndquadrant.com> writes:
> On 2015-02-20 22:19:54 -0500, Peter Eisentraut wrote:
>> On 2/20/15 8:46 PM, Josh Berkus wrote:
>>> Or what about just doing CSV?
>> I don't think that would actually address the problems. It would just
>> be the same format as now with different delimiters.
> Yea, we need hierarchies and named keys.
Yeah. One thought though is that I don't think we need the "data" layer
in your proposal; that is, I'd flatten the representation to something
more like
{ oid => 2249, oiddefine => 'CSTRINGOID', typname => 'cstring', typlen => -2, typbyval => 1,
... }
This will be easier to edit, either manually or programmatically I think.
The code that turns it into a .bki file will need to know the exact set
of columns in each system catalog, but it would have had to know that
anyway I believe, if you're expecting it to insert default values.
Ideally the column defaults could come from BKI_ macros in the catalog/*.h
files; it would be good if we could keep those files as the One Source of
Truth for catalog schema info, even as we split out the initial data.
regards, tom lane