$ account darold
pgFormatter is a mature, widely-used SQL formatter specifically designed for PostgreSQL. It operates as a command-line tool, a CGI web service, and a library, providing consistent formatting of SQL statements according to configurable rules (keyword case, indentation, comma placement, line width, etc.). The core formatting logic resides in the self-contained Perl module `lib/pgFormatter/Beautify.pm`, which parses SQL tokens and reformats them based on a comprehensive set of rules. The project includes a vast regression test suite derived from PostgreSQL's own regression tests, ensuring high syntax coverage and correctness across DDL, DML, procedural code, and edge cases. It also offers pre-commit hook integration and Docker deployment for CI/CD pipelines. The codebase is well-structured, actively maintained, and demonstrates strong engineering practices with isolated modules and extensive test coverage.