Skip to content
PluginStats

prettier-plugin-postgresql weekly downloads statistics

By schallm (2 listings) · npm · Prettier plugins

Prettier plugin for PostgreSQL using the official libpg_query parser

View on npm Fresh · Dec 6, 2026

prettier-plugin-postgresql has 137 recorded weekly downloads on npm, an increase of 552% over the past 30 days, ranking #2562 of 3,247 tracked listings.

Weekly downloads
137
Official API · Dec 5, 2026
7-day growth
-29.4%
-57 weekly downloads
30-day growth
+552%
+116 weekly downloads
90-day growth
+1145%
+126 weekly downloads
Rank
#2562
▼ 177 in 7 days

About prettier-plugin-postgresql

prettier-plugin-postgresql

Beta — covers the core PostgreSQL DML and DDL statement set. A number of uncommon top-level statements (e.g. CREATE CAST, ALTER DOMAIN, CREATE CONVERSION, CREATE STATISTICS, CREATE TEXT SEARCH …, CREATE OPERATOR CLASS, ALTER DEFAULT PRIVILEGES, CREATE / ALTER / DROP DATABASE, CREATE FOREIGN DATA WRAPPER) have no printer yet and are kept exactly as written (case and spacing included) instead. Inside a statement the formatter has a printer for, a construct it can't print raises an explicit Unsupported … error (for example a type modifier that is an expression, foo(1 + 1)) — it never silently drops or changes anything. The test suite enforces this by comparing the PostgreSQL parse tree before and after formatting.

A Prettier plugin for PostgreSQL SQL. Parses SQL with libpg_query (the actual PostgreSQL parser, from PostgreSQL 18) and formats it using Prettier's document IR for consistent, readable output.


Features

DML
  • SELECT — column lists, table aliases, all JOIN types (INNER, LEFT, RIGHT, FULL, CROSS, NATURAL), WHERE, GROUP BY / HAVING, ORDER BY, LIMIT / OFFSET, FETCH FIRST … WITH TIES, DISTINCT, DISTINCT ON
  • Set operations — UNION / UNION ALL / INTERSECT / EXCEPT, with WITH / ORDER BY / LIMIT applying to the whole result, and operands parenthesized where they need to be
  • VALUES — standalone, with WITH, ORDER BY and LIMIT
  • Subqueries — correlated subqueries, EXISTS, scalar sublinks, ARRAY(subquery), row comparisons ((a, b) < (SELECT …)), LATERAL
  • CTEs — WITH / WITH RECURSIVE, data-modifying CTEs (WITH ... DELETE/INSERT/UPDATE)
  • Window functions — OVER (PARTITION BY, ORDER BY, frame clauses: ROWS/RANGE/GROUPS BETWEEN)
  • Aggregate functions — FILTER (WHERE ...), ORDER BY inside aggregate (e.g. string_agg)
  • GROUP BY extensions — ROLLUP, CUBE, GROUPING SETS
  • Locking — FOR UPDATE / FOR SHARE / FOR NO KEY UPDATE / FOR KEY SHARE with OF, NOWAIT, SKIP LOCKED
  • INSERT — VALUES (single and multi-row), DEFAULT VALUES, ON CONFLICT DO NOTHING / DO UPDATE SET (conflict targets can be expressions, and a WHERE matches a partial unique index), RETURNING (with old / new and RETURNING WITH (OLD AS o, NEW AS n), PostgreSQL 18), OVERRIDING USER/SYSTEM VALUE, DEFAULT in VALUES, subscript / field targets (insert into t (a.b)), WITH clause
  • UPDATE — SET (including multi-column SET (a, b) = (…) / = (SELECT …), DEFAULT, and subscript / field targets like a[1] = 2), FROM, WHERE (including WHERE CURRENT OF cursor), RETURNING (with old / new), WITH clause
  • DELETE — WHERE (including CURRENT OF), RETURNING (with old / new), WITH clause
  • TRUNCATE — with RESTART IDENTITY and CASCADE
  • Transaction control — BEGIN / START TRANSACTION / COMMIT / ROLLBACK (with AND CHAIN) / SAVEPOINT / RELEASE SAVEPOINT / ROLLBACK TO SAVEPOINT / SET TRANSACTION (isolation level, READ ONLY/WRITE, DEFERRABLE) / PREPARE TRANSACTION / COMMIT PREPARED / ROLLBACK PREPARED
  • MERGE — WHEN MATCHED / WHEN NOT MATCHED / WHEN NOT MATCHED BY SOURCE; UPDATE SET, INSERT, DELETE, DO NOTHING actions; conditional AND clause; OVERRIDING in INSERT; RETURNING with merge_action() and old / new
  • CALL — stored-procedure invocation
DDL
  • CREATE TABLE — column definitions with full constraint support: NOT NULL (also named at table level, CONSTRAINT n NOT NULL col), DEFAULT, PRIMARY KEY, FOREIGN KEY (column-level and table-level, with MATCH FULL/PARTIAL and ON UPDATE/DELETE actions, including SET NULL (cols)), CHECK (with NO INHERIT), NOT ENFORCED / ENFORCED on CHECK and FOREIGN KEY, UNIQUE (with NULLS NOT DISTINCT), temporal keys (WITHOUT OVERLAPS, PERIOD), EXCLUDE (USING gist (col WITH op, …) WHERE (…)), GENERATED ALWAYS AS (…) STORED / VIRTUAL, GENERATED AS IDENTITY (with sequence options), named constraints, DEFERRABLE / INITIALLY DEFERRED; index parameters (INCLUDE, WITH (…), USING INDEX TABLESPACE); COLLATE, STORAGE and COMPRESSION column clauses, typed tables (OF type with WITH OPTIONS), type modifiers (VARCHAR(100), NUMERIC(10,2); a modifier that is an expression is unsupported), array types (TEXT[], INT[3]). Types written with SQL keywords get their standard spelling (int → integer); internal names (int4, float8, "char") are kept as written
  • ALTER TABLE (and INDEX / VIEW / MATERIALIZED VIEW / FOREIGN TABLE / SEQUENCE) — every subcommand libpg_query produces: ADD / DROP COLUMN, ADD / DROP / VALIDATE / ALTER CONSTRAINT (deferrability, [NOT] ENFORCED, [NO] INHERIT), ALTER COLUMN TYPE … COLLATE … USING, SET / DROP DEFAULT, SET / DROP NOT NULL, identity (ADD GENERATED, SET GENERATED, RESTART, DROP IDENTITY), DROP / SET EXPRESSION, SET STATISTICS / STORAGE / COMPRESSION, SET / RESET (options), trigger and rule enable / disable, row level security, CLUSTER ON, SET LOGGED / UNLOGGED, INHERIT, OF, REPLICA IDENTITY, ATTACH / DETACH PARTITION, OWNER TO, SET TABLESPACE, foreign table OPTIONS
  • ALTER … RENAME — every object kind: tables (IF EXISTS, ONLY), columns, constraints, indexes, views, sequences, schemas, databases, roles, triggers / policies / rules ON table, type attributes, domain constraints, operator classes USING method, functions, aggregates, and more
  • CREATE VIEW / CREATE MATERIALIZED VIEW
  • CREATE TABLE AS — CREATE TABLE foo AS SELECT ...
  • CREATE INDEX / CREATE UNIQUE INDEX
  • CREATE FUNCTION / PROCEDURE — RETURNS, LANGUAGE, dollar-quoted $$...$$ body, SQL-standard bodies (RETURN expr, BEGIN ATOMIC … END), TRANSFORM FOR TYPE, parameter lists with modes (IN, OUT, INOUT, VARIADIC) and %TYPE
  • CREATE TYPE — composite (AS (...)) and enum (AS ENUM (...))
  • ALTER TYPE — ADD VALUE for enums (with BEFORE/AFTER placement, IF NOT EXISTS), RENAME VALUE; ADD / DROP / ALTER ATTRIBUTE for composite…

Description from the npm listing.

  • prettier
  • prettier-plugin
  • sql
  • postgresql
  • postgres
  • pgsql
  • formatter

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

prettier-plugin-postgresql weekly downloads on npm, last 90 days: 137 weekly downloads as of Dec 5, 2026, +1145% over 90 days.prettier-plugin-postgresqlWeekly downloads on npm · Last 90 days137downloads / week+1145% over 90 days02004006008001KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
prettier-plugin-postgresql weekly downloads on npm, last 90 days: 137 weekly downloads as of Dec 5, 2026, +1145% over 90 days.

7/30/90-day growth

prettier-plugin-postgresql weekly downloads growth on npm: -29.4% over 7 days, +552% over 30 days, +1145% over 90 days.prettier-plugin-postgresqlWeekly downloads growth on npm137downloads / week now7-day growth-57 weekly downloads-29.4%30-day growth+116 weekly downloads+552%90-day growth+126 weekly downloads+1145%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-postgresql weekly downloads growth on npm: -29.4% over 7 days, +552% over 30 days, +1145% over 90 days.

Ranking history

prettier-plugin-postgresql npm ranking history: currently #2562 (by weekly downloads).prettier-plugin-postgresqlnpm ranking · by weekly downloads · Last 90 days#2562current rank#1400#1600#1800#2000#2200#2400#2600#2800#3000#3200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-postgresql npm ranking history: currently #2562 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 129, #2 (overall #2,562)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 5, #1 (overall #81)
Prettier plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for prettier-plugin-postgresql
Date (UTC)Weekly downloadsChange vs. previous
137-124
261+4
257+58
199+1
198+6
192-9
201+7
194+163
31+1
300
30+1
29+5
24+18
6—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-postgresql alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/prettier-plugin-postgresql. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.