Prettier Plugin for PostgreSQL
JSON →A Prettier plugin that uses the official libpg_query parser to format PostgreSQL SQL. Currently in beta (v0.2.3) with support for core DML and DDL constructs including SELECT, INSERT, UPDATE, DELETE, CTEs, window functions, CREATE TABLE, ALTER TABLE, indexes, views, functions, triggers, and more. Compared to generic SQL formatters, this plugin uses PostgreSQL's own parser for accurate syntax understanding and respects optional parentheses in WHERE clauses (default: minimal). Release cadence is monthly. Node >=20 and Prettier >=3 required. Ships TypeScript types.
Resources
packageprettier-plugin-postgresql ↗