{"id":17783563,"url":"https://github.com/skalt/postgres_explain_analyze_json_schema","last_synced_at":"2026-02-13T00:02:15.409Z","repository":{"id":139646258,"uuid":"500148338","full_name":"SKalt/postgres_explain_analyze_json_schema","owner":"SKalt","description":"a JSON schema for postgres EXPLAIN output","archived":false,"fork":false,"pushed_at":"2024-03-21T12:48:03.000Z","size":462,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-05T10:46:58.330Z","etag":null,"topics":["explain-plan","explain-sql","json-schema","postgres","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SKalt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-05T16:18:58.000Z","updated_at":"2025-02-16T01:15:14.000Z","dependencies_parsed_at":"2024-10-27T07:48:30.547Z","dependency_job_id":"d6319d3c-f13d-485d-9893-fa04a5fab9ab","html_url":"https://github.com/SKalt/postgres_explain_analyze_json_schema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SKalt/postgres_explain_analyze_json_schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SKalt%2Fpostgres_explain_analyze_json_schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SKalt%2Fpostgres_explain_analyze_json_schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SKalt%2Fpostgres_explain_analyze_json_schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SKalt%2Fpostgres_explain_analyze_json_schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SKalt","download_url":"https://codeload.github.com/SKalt/postgres_explain_analyze_json_schema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SKalt%2Fpostgres_explain_analyze_json_schema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29387683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T22:07:52.078Z","status":"ssl_error","status_checked_at":"2026-02-12T22:07:49.026Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["explain-plan","explain-sql","json-schema","postgres","postgresql"],"created_at":"2024-10-27T07:43:13.181Z","updated_at":"2026-02-13T00:02:15.389Z","avatar_url":"https://github.com/SKalt.png","language":"Python","readme":"# postgres_explain_analyze_json_schema\n\na JSON schema for postgres ``EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS)` yaml or json.\n\n## Methodology\n\nUnfortunately, the schema is hand-maintained.\n\n1. I generated many the output of many `EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT YAML)` queries in [`pg_inventory`](https://github.com/SKalt/pg_inventory)\n1. an initial skeleton of the schema was generated with [the python `genson` package](https://github.com/wolverdude/GenSON/) using [`./scripts/generate_initial_schema.py`](./scripts/generate_initial_schema.py),\n1. guessing which string types have constrained values, (i.e. any key ending in \" Type:\"), I used [`./scripts/collect_enums.sh`](./scripts/collect_enums.sh) to generate enumeration values and hand-defined the enumerations\n1. I extracted a definition of a `Plan` object and used it to recursively define itself\n1. I transformed the JSON into the primary document, [`schema.yaml`](./schema.yaml) using [`./scripts/to_yaml.py`](./scripts/to_yaml.py) \u003c!-- TODO: enhance the YAML schema with documentation --\u003e\n1. I test the definition against the corpus of YAML I have using [`./scripts/validate_schema_against_corpus.py`](./scripts/validate_schema_against_corpus.py).\n1. Re-transform [`schema.yaml`](./schema.yaml) into [`schema.json`](./schema.json) for easier distribution\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskalt%2Fpostgres_explain_analyze_json_schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskalt%2Fpostgres_explain_analyze_json_schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskalt%2Fpostgres_explain_analyze_json_schema/lists"}