a JSON schema for postgres ``EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS)` yaml or json.
Unfortunately, the schema is hand-maintained.
- I generated many the output of many
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT YAML)queries inpg_inventory - an initial skeleton of the schema was generated with the python
gensonpackage using./scripts/generate_initial_schema.py, - guessing which string types have constrained values, (i.e. any key ending in " Type:"), I used
./scripts/collect_enums.shto generate enumeration values and hand-defined the enumerations - I extracted a definition of a
Planobject and used it to recursively define itself - I transformed the JSON into the primary document,
schema.yamlusing./scripts/to_yaml.py - I test the definition against the corpus of YAML I have using
./scripts/validate_schema_against_corpus.py. - Re-transform
schema.yamlintoschema.jsonfor easier distribution