pgFormatter vs SQL Enlight
pgFormatter
github.comSQL Enlight
sqlenlight.comSide by side
| Figure | pgFormatter | SQL Enlight |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | Yes |
| Open source | — | — |
| Web | Yes | — |
| Windows | — | Yes |
| Linux | Yes | — |
| API | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 2 |
| Spec score · SQL Linters and Formatters | 8.2 (#6) | 8.1 (#8) |
| Purpose | pgFormatter beautifies PostgreSQL SQL queries and PL/pgSQL code, and supports keywords from several SQL standards as well as PostgreSQL-specific keywords. | SQL Enlight is a static code analysis and refactoring tool for SQL Server and T-SQL. |
Plans
SQL Enlight
- SQL Enlight for Build MachinesPriced on request
- SQL Enlight for DevelopersPriced on request
In their own words
pgFormatter
pgFormatter is free software for formatting PostgreSQL SQL queries and PL/pgSQL code. It supports SQL-92, SQL-99, SQL-2003, SQL-2008, SQL-2011 and PostgreSQL syntax, and the project says it also works with other databases. You can run it as a console program or CGI application that returns text or HTML; a CGI request with an application/json Accept header can return JSON. Formatting controls cover keyword, function, identifier and type case, indentation, query wrapping and comma placement. The --anonymize option hides query literals before formatting. The project documents source installation with Perl Makefile.PL, make and make install, Docker use, Vim and (Neo)Vim integration, Atom and Visual Studio Code links, and a pre-commit hook for SQL files. An online demo limits queries to ten thousand characters. It is distributed under the PostgreSQL Licence at free.
SQL Enlight
SQL Enlight is a static analysis and refactoring tool for SQL Server and T-SQL. It examines code and databases for defects and supports server health monitoring, diagnosis, and performance tuning. Developers can validate syntax, run automated reviews, and apply automatic fixes to some code and database issues. Formatting, script summaries, and outlines help make large scripts easier to work with; sections can also be extracted into stored procedures or functions. Developers and database administrators can create custom analysis rules with XPath and XSLT. The tool integrates with SQL Server Management Studio and Visual Studio, and supports build workflows through Team Foundation Server check-in policies, MSBuild tasks, a command-line interface, and an Automation API. Its Azure DevOps extension supports build analysis, quality gates, reports, and pull-request checks and comments; a SonarQube plugin adds T-SQL issues, measures, rules, and quality-gate integration. SQL Enlight supports SQL Server 2005 through 2022, including Azure SQL Database. The paid product has a 14-day evaluation period. Licenses include email support, updates, and documentation access.