pgformatter
« Back to VersTracker
Description:
PostgreSQL syntax beautifier
Type: Formula  |  Latest Version: 5.8@0  |  Tracked Since: Dec 21, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: postgresql sql formatter developer-tools database
Install: brew install pgformatter
About:
pgFormatter is a PostgreSQL query beautifier that parses and reformats SQL code according to configurable style rules. It handles complex queries, nested subqueries, and PL/pgSQL blocks while maintaining syntax integrity. The tool supports custom formatting configurations and is widely used for standardizing SQL in development teams.
Key Features:
  • Supports complex SQL including CTEs and window functions
  • Configurable formatting rules and indentation
  • Handles PL/pgSQL blocks and stored procedures
  • Command-line interface for batch processing
  • Preserves comments and handles special cases
Use Cases:
  • Standardizing SQL code across development teams
  • Formatting legacy SQL for better readability
  • Preparing SQL for version control and code reviews
  • Automating SQL formatting in CI/CD pipelines
Alternatives:
  • sqlfluff – Multi-dialect SQL linter with formatting capabilities
  • pgAdmin – GUI tool with basic SQL formatting features
Version History
Detected Version Rev Change Commit
Dec 21, 2025 11:08am 5.8 0 VERSION_BUMP e8635478