Skip to content
PluginStats

prettier-plugin-postgresql-rs weekly downloads statistics

By jeromedg-dlh · npm · Prettier plugins

Prettier plugin for PostgreSQL, powered by the Rust pgsqlfmt formatter

View on npm Fresh · Dec 6, 2026

prettier-plugin-postgresql-rs has 8 recorded weekly downloads on npm, an increase of 33.3% over the past 30 days, ranking #3165 of 3,247 tracked listings.

Weekly downloads
8
Official API · Dec 5, 2026
7-day growth
+60.0%
+3 weekly downloads
30-day growth
+33.3%
+2 weekly downloads
90-day growth
—
Insufficient history
Rank
#3165
▼ 62 in 7 days

About prettier-plugin-postgresql-rs

prettier-plugin-postgresql-rs

A Prettier plugin for PostgreSQL. Formatting is done by the Rust pgsqlfmt crate, compiled to a native Node addon with napi-rs.

-- before
select a,b from t where x=1;

-- after
SELECT
  a,
  b
FROM t
WHERE x = 1;

Install

npm install --save-dev prettier prettier-plugin-postgresql-rs

Requires Prettier 3.

Prerelease: the current next build (0.1.0-alpha.x) only includes a binary for macOS on Apple Silicon (arm64). Binaries for macOS x64, Linux x64 (glibc) and Windows x64 are planned for the first stable release.

Usage

Add the plugin to your Prettier config:

{
  "plugins": ["prettier-plugin-postgresql-rs"]
}

Files ending in .sql, .pgsql and .psql are then formatted automatically:

npx prettier --write "**/*.sql"

To use the plugin for other files, set "parser": "postgresql" in an override.

Statements that pgsqlfmt cannot parse are left unchanged.

Options

OptionDefaultDescription
pgKeywordCase"upper"Case of SQL keywords: "upper", "lower" or "preserve".
pgCommaStyle"trailing"Comma position when items go one per line: "trailing" or "leading".

Prettier's own printWidth and tabWidth are respected (tabWidth minimum 2).

{
  "plugins": ["prettier-plugin-postgresql-rs"],
  "pgKeywordCase": "lower",
  "pgCommaStyle": "leading"
}

Using the formatter directly

The native binding can also be used without Prettier:

const { formatSql } = require('prettier-plugin-postgresql-rs/index.js')

formatSql('select 1', { maxWidth: 80, indentWidth: 2, keywordCase: 'upper', commaStyle: 'trailing' })

Development

Requires a recent Rust toolchain and Node.js.

yarn install
yarn build   # builds prettier-plugin-pgsql.<platform>.node
yarn test

License

MIT

Description from the npm listing.

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

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-rs weekly downloads on npm, last 90 days: 8 weekly downloads as of Dec 5, 2026.prettier-plugin-postgresql-rsWeekly downloads on npm · Last 90 days8downloads / week020406080100120140160Sep 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-rs weekly downloads on npm, last 90 days: 8 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

prettier-plugin-postgresql-rs weekly downloads growth on npm: +60.0% over 7 days, +33.3% over 30 days, 90-day growth unavailable.prettier-plugin-postgresql-rsWeekly downloads growth on npm8downloads / week now7-day growth+3 weekly downloads+60.0%30-day growth+2 weekly downloads+33.3%90-day growth+8 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-postgresql-rs weekly downloads growth on npm: +60.0% over 7 days, +33.3% over 30 days, 90-day growth unavailable.

Ranking history

prettier-plugin-postgresql-rs npm ranking history: currently #3165 (by weekly downloads).prettier-plugin-postgresql-rsnpm ranking · by weekly downloads · Last 90 days#3165current rank#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-rs npm ranking history: currently #3165 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 159, #7 (overall #3,167)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 12, #14 (overall #234)
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-rs
Date (UTC)Weekly downloadsChange vs. previous
8+3
50
5+1
4+1
30
30
3-2
5-1
6+1
5-1
6-1
70
7+1
6—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-postgresql-rs 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-rs. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.