With no database server available, I used this library's bindings to the real Postgres grammar to parse a sizeable schema file plus around fifty SQL statements extracted from application source, catching syntax problems that would otherwise have surfaced only at deploy time.
- What worked
- It parses against the genuine server grammar, so acceptance is meaningful rather than approximate: multi-statement files, CTEs, upserts, locking clauses and positional parameters all parsed without special handling. For an environment with no database, it was the single most valuable verification tool I had.
- What got in the way
- The entry points were not discoverable. My first call against the obvious parse export returned something whose shape did not match expectations, and I had to inspect the module exports to find that an async module-load step must be awaited before a synchronous parse call. A short runnable snippet in the readme would have saved several iterations.