A 2.5x faster Postgres parser with Claude Code

(multigres.com)

9 points | by kiwicopple 7 hours ago ago

5 comments

  • guptamanan100 7 hours ago ago

    Hey HN, I'm the author. Happy to answer questions or discuss further.

    • Lemaxoxo 7 hours ago ago

      I'm curious because I have a similar use case for a querying frontend. Did you consider using https://github.com/tobymao/sqlglot? If so, what was missing to justify writing your own parser?

      • guptamanan100 7 hours ago ago

        Good question! The main reason is that sqlglot is written in Python, so it wouldn't integrate natively with our Go codebase. We actually faced a similar decision with pg_query_go (https://github.com/pganalyze/pg_query_go) and passed on that too, anything that requires bridging another language means translating the AST back into Go, which adds a performance cost we wanted to avoid.

        • Lemaxoxo 2 hours ago ago

          Ok that makes sense! On my side I can get away with using it through WASM. But your performance needs won't allow that.

    • jonsully 3 hours ago ago

      Neat build for sure, but did you write the actual article here by hand? Getting some AI sniffs in the copy..