Releases: gmr/pgfmt
Releases · gmr/pgfmt
v2.1.7
v2.1.6
What's Changed
Changed
- Bump
libpgfmtto 1.1.7 (now ontree-sitter-postgres1.2.4), bringing support forAT TIME ZONEexpressions andE'...'escape strings, multi-word type names in::casts, and graceful handling ofLANGUAGE sqlfunction bodies. Catalog-dumped views and functions that previously failed now format correctly.
v2.1.5
What's Changed
Changed
- Bump
libpgfmtto 1.1.6, which adds PL/pgSQL formatting support for multi-word type names (character varying,double precision,timestamp with time zone),DEFAULTinitializers,ALIAS FOR $N, bareRETURN NEXT/RETURN QUERY, andFOR-over-query loops, and fixes decimal-literal handling. (libpgfmt v1.1.6)
v2.1.4
What's Changed
Fixed
- Typed string literals are no longer dropped during formatting.
SELECT INTERVAL '2 days'previously formatted toSELECT INTERVAL; this affectedINTERVAL,DATE,TIMESTAMP, interval qualifiers (INTERVAL '2' DAY), and precision (INTERVAL(6) '...'). Fixed via libpgfmt 1.1.4 (#7)
Documentation
- Document the Homebrew 6.0 tap-trust workaround in the README
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.0
What's New
Complete rewrite of pgfmt from Python to Rust, powered by libpgfmt.
Changes
- Rewritten CLI in Rust using libpgfmt and clap
- Default formatting style changed from river to aweber
- Pre-built binaries for Linux and macOS (x86_64 and aarch64)
- curl-based installer script
Install
curl -fsSL https://raw.githubusercontent.com/gmr/pgfmt/main/install.sh | shOr via Cargo:
cargo install pgfmt0.1.0a1
What's Changed
Added
- New SQL formatting styles: dbt-modern (lowercase keywords), GitLab, Kickstarter, and mattmc3 modern SQL (#2)
- AWeber-style formatter with river alignment, CASE expression formatting, and nested CTE support (#1, #2)
- River-style SQL formatter as the base for alignment-driven styles, including subquery indentation, CTE support, and CREATE TABLE/VIEW/FUNCTION/DOMAIN/MATERIALIZED VIEW (#1)
- Mozilla-style SQL formatter (#1)
- CLI and Python library API with passthrough for unsupported statement types
- MkDocs documentation for CLI, API, and all formatting styles
Fixed
- Nested CTE river width inheritance: width is now always computed as the maximum of the inherited width and the local unified river width, ensuring consistent alignment across nested WITH scopes (#2)
- CASE expression multi-line THEN/ELSE value indentation in AWeber style (#2)
- Integer and float zero literal parsing
- USING clause preservation and passthrough output normalization in Mozilla style
- CREATE FUNCTION STRICT/SECURITY option parsing