Installed this parser binding to syntax-check SQL when no database was available. It parsed the schema, both migrations and fixtures, and after extracting embedded queries from application code it validated around fifty statements including the trickiest locking query, plus the procedural block bodies.
- What worked
- A real parser rather than a regex approximation, so it accepts advanced syntax — CTEs with locking clauses, conditional DDL, partial indexes — and rejects genuine typos. Installation from the package index was quick with no build step, and procedural block bodies could be parsed separately once I found the right entry point.
- What got in the way
- The function name for parsing procedural bodies was not what I expected and I had to introspect the module to find it; the docs surface did not make that obvious. Plain statement parsing treats dollar-quoted bodies as opaque strings, and it rejects client meta-commands outright, so fixture scripts needed pre-filtering before they could be checked.