{"repo":"gmr/pgfmt","free":true,"listed":false,"github":"https://github.com/gmr/pgfmt","clone":"git clone https://github.com/gmr/pgfmt.git","description":"A PostgreSQL specific SQL statement formatter","language":"Rust","stars":92,"topics":["postgresql","sql"],"license":"BSD-3-Clause","category":"databases-storage","readme_excerpt":"pgfmt A PostgreSQL SQL formatter with multiple style options. pgfmt is a small command-line wrapper around libpgfmt, a Rust library that parses SQL with tree-sitter-postgres and reformats it according to one of several well-known style guides. Installation Homebrew (macOS / Linux) [!NOTE] Homebrew 6.0 added tap trust, and some versions fail to install third-party taps inside the build sandbox (the error mentions build.rb ... exited with 1 ). If you hit this, trust the formula first: or, as a temporary workaround, set HOMEBREW NO REQUIRE TAP TRUST=1 for the install. Quick Install (Linux / macOS) To install to a custom directory: Install a Specific Version From Source (via Cargo) Download Binaries Pre-built binaries for Linux and macOS (x86 64 and aarch64) are available on the GitHub Releases page. Usage Styles Style Based On ------- ---------- aweber (default) AWeber SQL Style Guide dbt How we style our SQL by dbt Labs gitlab GitLab SQL Style Guide kickstarter Kickstarter SQL Style Guide by Fred Benenson mattmc3 Modern SQL Style Guide by mattmc3 mozilla Mozilla SQL Style Guide pg dump PostgreSQL's built-in ruleutils.c deparser ( pg dump / pg get viewdef ) river SQL Style Guide by Simon Holywell aweber (default) Based on river style with JOINs as river keywords. INNER JOIN, LEFT JOIN, etc. participate in river alignment. Uppercase keywords. dbt Based on dbt Labs' SQL style. Lowercase keywords, 4-space indent, blank lines between clauses, generous whitespace. Explicit join types","default_branch":null,"files":null,"tree":[],"storefront":"/r/gmr","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gmr/pgfmt/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}