Skip to content
SPECIFICTION
Get listed

pgFormatter vs TSQLLint

pgFormatter

github.com

TSQLLint

github.com

Side by side

FigurepgFormatterTSQLLint
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WebYes—
Windows—Yes
macOS—Yes
LinuxYesYes
APIYes—
Self-hostedYes—
Plans published11
Spec score · SQL Linters and Formatters8.2 (#6)7.4 (#19)
PurposepgFormatter beautifies PostgreSQL SQL queries and PL/pgSQL code, and supports keywords from several SQL standards as well as PostgreSQL-specific keywords.TSQLLint describes, identifies, and reports anti-patterns in TSQL scripts.

Plans

pgFormatter

  • pgFormatterFree

pgFormatter pricing →

TSQLLint

  • TSQLLintFree

TSQLLint pricing →

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.

Visit github.com

TSQLLint

TSQLLint checks T-SQL scripts for anti-patterns and reports the findings. Its command-line tool can correct issues it identifies as auto-fixable with the --fix or -x option. Rules can be set to off, warning, or error; an error-level violation produces a non-zero exit code. Users can save settings in a .tsqllintrc file, or use the tool’s in-memory defaults when no file is present. The listed SQL Server compatibility levels are 80, 90, 100, 110, 120, 130, 140, and 150. Custom .NET plugins can extend it if they implement TSQLLint’s IPlugin interface and target net6.0. Before linting, it substitutes SQL file placeholders with values from environment variables. Official installation methods include dotnet-tool, Homebrew, and NPM. Its VS Code extension marks potential problems in opened .sql files for inspection on hover, and SQL Server Management Studio can invoke it through External Tools. TSQLLint is free under the MIT License and runs on Linux, macOS, and Windows, with an editor extension also listed.

Visit github.com