PgSanity vs Squawk
PgSanity
github.comSquawk
squawkhq.comSide by side
| Figure | PgSanity | Squawk |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| Web | — | Yes |
| Windows | — | Yes |
| macOS | — | Yes |
| Linux | Yes | Yes |
| iOS | — | Yes |
| Android | — | Yes |
| API | — | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 0 |
| Spec score · SQL Linters and Formatters | 7.9 (#11) | 7.3 (#22) |
| Purpose | PgSanity checks the syntax of PostgreSQL SQL files. | It checks schema changes to help prevent blocking reads or writes and breaking existing clients. |
| Support | The README points users to the GitHub project page to report problems. | The site links to GitHub Help and directs users to open an issue if a rule, message, or documentation page needs improvement. |
Plans
In their own words
Squawk
Squawk is an open-source linter and language server for PostgreSQL migrations and SQL. It checks schema changes for risks that could prevent database reads or writes. Its rules flag potentially unsafe statements, incompatible changes, and migration patterns, with messages that include examples and reasoning. The command-line tool lints SQL files, and a language server and VS Code extension provide editor linting.
For pull requests, a GitHub Action can lint modified migrations; Squawk can also comment through its upload-to-github command or GitHub App. For CI outside GitHub Actions, the documentation recommends configuring the GitHub App, citing CircleCI as an example. Installation options include npm, PyPI, release binaries, Docker, the browser playground, and VS Code. The playground uses WebAssembly to lint SQL in a browser. Configuration can set the PostgreSQL version, include or exclude rules and paths, and specify whether SQL files are assumed to run in transactions. Some rules are disabled by default and require explicit enabling. Squawk supports PostgreSQL only and has no automatic fixes or custom rules.