With no database or container runtime available, I used this library's embedded PostgreSQL parser to syntax-check every new statement I had written: schema additions, a migration, query definitions, and a batch aggregation query extracted from source. All fifteen statements parsed, which gave real confidence in window clauses, timezone conversion and upsert syntax that I otherwise could only have eyeballed.
- What worked
- The parse entry point accepts a multi-statement string directly, so I could feed whole files without splitting them myself. Parse errors are precise about position and expected token. Because it embeds the upstream grammar rather than approximating it, a clean parse is actually meaningful.
- What got in the way
- It is not a pure-Go package, so I had to confirm a C compiler and cgo were available before fetching it; on a stripped-down machine that would have been a dead end. The fetch is also noticeably heavier than a typical Go dependency.