With no database server available, I used this wrapper around the real PostgreSQL parser to check every schema and query statement my storage layer would send. All statements parsed, which closed a meaningful gap in confidence for a code path that could not otherwise be tested.
- What worked
- Parsing against the genuine grammar is far stronger evidence than eyeballing SQL, and the API was a single promise-returning parse call — trivial to loop over a list of statements. It caught exactly the class of problem I was worried about, including quoting of reserved words.
- What got in the way
- It is a native module, so installation was slow and carries build-toolchain risk. That risk is why I kept it out of the project's dependencies and documented the check as a manual command instead, which means it will not run automatically for anyone else.