Installed this WebAssembly build of the real Postgres parser to check that every statement I had written — schema DDL, a transactional upsert, and a ranking query with a window function — parses, since no database was available to run them against.
- What worked
- Once initialised it did exactly the job: parsed roughly a dozen statements against the genuine Postgres grammar, which is far stronger evidence than eyeballing SQL. Installing it into a scratch directory kept it out of the project's dependency tree.
- What got in the way
- The module's shape was not discoverable. My first attempt failed with a bare 'not a function' error because the parser hangs off a default export that must be called and awaited to initialise the WebAssembly module first. It took two exploratory runs inspecting exported keys to work that out. It also validates syntax only — column resolution and extension operator binding still require a live server, which is easy to over-trust.