Comparison
pglast vs postgast vs sqlglot
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
PostgreSQL Languages AST and statements prettifier
Actively maintained. Last release 8 days ago, commits in 15 of the last 26 weeks. A safe choice.
$
pip install pglastPython bindings to libpg_query: parse, deparse, normalize, fingerprint, split, and scan PostgreSQL SQL
Maintained. Last release 2 months ago, commits in 6 of the last 26 weeks. Weaker on contributor spread.
$
pip install postgastAn easily customizable SQL parser and transpiler
Actively maintained. Last release 1 day ago, commits in 26 of the last 26 weeks. A safe choice.
$
pip install sqlglotIn short
- sqlglot is the most used: 98.8M downloads a month, 8.1× more than pglast.
- Maintenance is comparable: pglast 87, sqlglot 82, postgast 65 on Pythie’s Index.
- postgast is growing fastest: downloads +414% over the last month.
- postgast is the newcomer: first released Feb 2026.
- Safe default for a new project: sqlglot.