Help us shape the future of Go! Take the 2026 Go Developer Survey

regenerate

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Command regenerate derives every golden in parser/testdata from the pinned oracle (libpg_query 18.0.0 via pg_query_go v6.2.2, cgo). It is the only writer of that tree; expected outputs are NEVER edited by hand.

go run ./cmd/regenerate -libpg-query <checkout@18.0.0> -pg-query-go <checkout@v6.2.2>

Corpus tiers extracted:

  • test/sql/postgres_regress/*.sql → parse, scan, normalize, fingerprint, deparse suites (the PostgreSQL regression suite; psql metacommands and COPY-FROM-stdin payloads filtered)
  • test/sql/deparse/*.sql, deparse-depesz/*.sql → parse, scan, deparse
  • inline test tables (test/*_tests.c) → their respective suites (inputs transcribed mechanically; expectations always from the oracle)
  • pg_query_go testdata/fingerprint.json → fingerprint suite (includes the 1.1 MB stress insert)

Output must be byte-identical across runs — that reproducibility is milestone 2's acceptance gate and is enforced weekly in CI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL