pkg.soopen package index

brew / rank 2805

Install pgformatter with Homebrew, apt, Nix, pacman, MacPorts

PostgreSQL syntax beautifier. Version 5.11 via Homebrew; verified 2026-09-13. Also installable with debian: sudo apt install pgformatter.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install pgformatter

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install pgFormatter

MacPorts ports tree · databases/pgFormatter/Portfile · source: api.github.com

Linux

Debian aptverified · 92%
sudo apt install pgformatter

Debian stable package indexes · pgformatter · source: deb.debian.org

Nixverified · 92%
nix profile install nixpkgs#pgformatter

nixpkgs package indexes · pkgs/by-name/pg/pgformatter/package.nix · source: api.github.com

Arch Linux pacmanverified · 92%
sudo pacman -S pgformatter

Arch Linux sync databases · pgformatter · source: geo.mirror.pkgbuild.com

overview

Package summary

PostgreSQL syntax beautifier

Commands and aliases

  • pg_format

history

Project history and usage

pgFormatter is Gilles Darold's formatter for PostgreSQL SQL and PL/pgSQL, usable as the `pg_format` console program or as a CGI and online formatter.

Project history

Gilles Darold created pgFormatter as a PostgreSQL SQL and PL/pgSQL beautifier; official source copyright begins in 2012. The project incorporates a modified SQL::Beautify module and credits substantial later refactoring by Hubert Lubaczewski.

The project evolved beyond basic pretty-printing to support multiple SQL standards, PostgreSQL-specific syntax, configurable casing and indentation, anonymization, placeholders, editor integrations, a JSON-capable CGI interface, and automated hook workflows.

Adoption history

pgFormatter is packaged by Homebrew, Debian, Ubuntu, MacPorts, Nix, and Arch Linux according to source_facts.package-manager. Its repository also supplies a pre-commit hook definition and documents editor, container, and automation workflows.

How it is used

Users format one or more files or stdin with `pg_format`, write to stdout or a selected output, or update files in place. Persistent options can be stored in a project-local, home-directory, or XDG configuration file.

Common workflows include editor format commands, pre-commit hooks, CI checks, Docker pipelines, anonymizing literals before sharing SQL, and the official web/CGI formatter.

Why package nerds care

pgFormatter fills for PostgreSQL SQL a role analogous to established language formatters: it makes formatting repeatable in editors, hooks, scripts, and CI while understanding PostgreSQL-specific SQL and PL/pgSQL constructs.

Its combination of a Perl CLI, CGI interface, online formatter, stdin/stdout operation, in-place editing, and persistent configuration makes it especially composable in Unix-oriented development environments.

Timeline

  • 2012: Official source copyright begins for Gilles Darold's pgFormatter.
  • 2018: PostgreSQL community news recorded the pgFormatter 3.0 release.
  • 2020s: The project added broader PostgreSQL syntax support, XDG configuration discovery, and native pre-commit integration.

Related projects

  • The repository includes a native pre-commit hook that invokes `pg_format --inplace`, allowing formatting to run automatically in Git workflows.

Sources

  • Official CLI source and copyright: https://github.com/darold/pgFormatter/blob/master/lib/pgFormatter/CLI.pm
  • Official README: https://github.com/darold/pgFormatter#readme
  • Official hook definition: https://github.com/darold/pgFormatter/blob/master/.pre-commit-hooks.yaml
  • Package adoption: source_facts.package-manager

security posture

No protected-tool coverage found yet

No matching local secret-handling manifest was found for pgformatter. Package metadata is still published here so future coverage has a stable package URL.

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
./.pg_format~/.pg_format$XDG_CONFIG_HOME/pg_format/pg_format.conf
Windows
./.pg_format%USERPROFILE%\.pg_format

executables

Installed executables

CommandKindExposureNote
pg_formatcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-11-04
manager version5.11
manager updated2026-09-13
local dataok
upstreamcurrent
latest detectedv5.11

https://github.com/darold/pgFormatter

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:pgformatter
Version5.11
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/pgformatter
Homepagehttps://sqlformat.darold.net/
Repositoryhttps://github.com/darold/pgFormatter
Upstream docshttps://sqlformat.darold.net/
LicensePostgreSQL
Source archivehttps://github.com/darold/pgFormatter/archive/refs/tags/v5.11.tar.gz
Last updated2026-09-13T11:25:12Z
Pulseupdated
Bottleavailable (on arm64_golden_gate, arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namepgformatter
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

pgformatter 5.6-1

PostgreSQL SQL syntax beautifier

https://sqlformat.darold.net/

sudo apt install pgformatter
  • Section: database
  • Architecture: all
  • 1 dependencies
  • normalized package name match
  • Matched by: Pgformatter
Debian stable package indexes · deb.debian.org · Debian stable package indexes: pgformatter from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

pgformatter

nix profile install nixpkgs#pgformatter
  • normalized package name match
  • Matched by: Pgformatter
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/pg/pgformatter/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

pgformatter 5.5-1

PostgreSQL SQL syntax beautifier

https://sqlformat.darold.net/

sudo apt install pgformatter
  • Section: universe/database
  • Architecture: all
  • 1 dependencies
  • normalized package name match
  • Matched by: Pgformatter
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: pgformatter from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
pacman95%

pgformatter 5.10-1

A PostgreSQL SQL syntax beautifier

https://github.com/darold/pgformatter

sudo pacman -S pgformatter
  • License: PostgreSQL
  • Architecture: any
  • 1 dependencies
  • normalized package name match
  • Matched by: Pgformatter
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: pgformatter from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
MacPorts95%

pgFormatter

sudo port install pgFormatter
  • normalized package name match
  • Matched by: Pgformatter
MacPorts ports tree · api.github.com · MacPorts ports tree: databases/pgFormatter/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment
  • pkg.so package database
  • pkgdb category and tag curation