pgquarrel
pgquarrel is a free tool for comparing PostgreSQL database schemas and generating commands that bring a target schema in line with a source.
What pgquarrel is
pgquarrel is a free tool for comparing PostgreSQL database schemas and generating commands that bring a target schema in line with a source. It connects directly to PostgreSQL servers and reads catalog metadata rather than relying on tools such as pg_dump. The project describes deployment of schema changes to testing, staging, or production as its main use. Filters and options allow comparison of selected object types and inclusion or exclusion of schemas by pattern. Generated changes go to stdout by default, with options to write to a file, print a summary, or output changes as one transaction. pgquarrel does not alter table data using INSERT, UPDATE, DELETE, or COPY operations. Documented coverage includes PostgreSQL object types with both complete and partial support; inheritance and roles are listed as major omissions. Output may not work as expected when the source PostgreSQL version is newer than the target. The software is BSD-3-Clause licensed and distributed as source through GitHub or a Git clone. The listed latest release is version 0.7.0.
Good
- Compares schemas by connecting directly to PostgreSQL servers.
- Supports object-type and schema-pattern filters.
- Can write SQL changes to a file or one transaction.
- Free and BSD-3-Clause licensed.
Watch out
- Inheritance and roles are unsupported.
- Some PostgreSQL object types have only partial support.
- Newer source versions may produce unexpected output for older targets.
- Distributed as source code.
Who it suits
pgquarrel suits database administrators or developers deploying PostgreSQL schema changes between environments. It is most relevant when schema comparison is needed without manipulating table data.
Verdict
pgquarrel provides a focused way to generate PostgreSQL schema changes for deployment across environments. Check its object coverage and version caveat before relying on the generated output.
Plans and prices
From pgquarrel's own pricing page, checked 3 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| pgquarrel | Free | BSD-3-Clause licensed software |
The facts
Each one read from pgquarrel's own pages, with the date it was checked.
What it does
- Data scope
- The tool does not manipulate table data with INSERT, UPDATE, DELETE, or COPY operations.checked 3 Oct 2026
- Deployment use
- The README describes deploying database changes to testing, staging, or production environments as its main use case.checked 3 Oct 2026
- Direct connections
- It connects directly to PostgreSQL servers and reads catalog metadata rather than relying on tools such as pg_dump.checked 3 Oct 2026
- Distribution
- pgquarrel is distributed as source code through GitHub and can also be obtained by cloning its Git repository.checked 3 Oct 2026
- License
- The repository identifies the software as BSD-3-Clause licensed.checked 3 Oct 2026
- Notable omissions
- The README identifies inheritance and roles as main absences and says pgquarrel does not support all PostgreSQL objects.checked 3 Oct 2026
- PostgreSQL object coverage
- The README lists support for many PostgreSQL objects, with support marked partial for numerous types and complete for others.checked 3 Oct 2026
- Purpose
- pgquarrel compares PostgreSQL database schemas (DDL) and outputs the differences as commands to make the target schema match the source.checked 3 Oct 2026
- Release
- The releases page lists version 0.7.0 as the latest release and notes fixes to its Windows, Debian/Ubuntu, and FreeBSD builds.checked 3 Oct 2026
- Selective comparison
- It supports filters and options to compare selected object types and include or exclude schemas by pattern.checked 3 Oct 2026
- SQL output
- Changes are output to stdout by default, with options to write to a file, print a summary, or output changes as a single transaction.checked 3 Oct 2026
- Support channel
- The repository has a public GitHub issues page for bug reports and feature requests.checked 3 Oct 2026
- Version compatibility
- The generated file may not work as expected when the source PostgreSQL version is newer than the target version.checked 3 Oct 2026
Where it runs
- Platforms
- The README says it was tested on Linux, FreeBSD, and Windows, and provides installation instructions for UNIX based operating systems and Windows.checked 3 Oct 2026
The full review of pgquarrel
pgquarrel is a free command-line utility for comparing PostgreSQL schemas and producing SQL that moves a target toward a source definition. It is aimed at developers and database operators managing DDL deployments across environments. The focused scope is useful when schema changes are the job, but teams must account for unsupported objects and version compatibility before treating its output as deployment-ready.
Overview
pgquarrel connects directly to PostgreSQL servers and reads catalog metadata, instead of depending on tools such as pg_dump. It compares schema definitions and generates commands for the differences; it does not manipulate table contents through INSERT, UPDATE, DELETE, or COPY. That boundary makes it appropriate for schema migration work, not for moving application data.
The principal workflow is promotion from testing to staging or production. The generated commands can bring the target schema in line with the source, giving operators a concrete migration script to review and run. This is a practical fit for single-engine PostgreSQL estates that prefer a focused CLI over a broader database suite.
Key features
Selective comparison is one of pgquarrel's strongest controls. Filters can limit comparison to particular PostgreSQL object types, while schema patterns can include or exclude namespaces. Those options reduce irrelevant differences in shared or multi-schema databases and help keep a deployment focused.
Changes are written to standard output by default. You can redirect them to a file, request a summary, or emit the complete change set as one transaction. Standard-output and file modes fit scripted pipelines; the transaction option can simplify atomic execution, although the resulting SQL still requires operational review.
Object coverage is broad but not uniform. Some PostgreSQL object types are complete, while many others are only partial. Inheritance and roles are specifically absent, and the tool does not claim support for every PostgreSQL object. Consequently, pgquarrel is dependable only for the portions of a schema its implementation covers; databases relying heavily on omitted or partial objects need another process or manual additions.
Version direction also matters. A generated file may not work as expected when the source PostgreSQL version is newer than the target. Aligning versions, or at least checking compatibility before execution, is therefore part of responsible use rather than an optional precaution.
Pricing
pgquarrel has one plan: pgquarrel costs free. It is BSD-3-Clause licensed software, with no paid tier or free-trial period to manage. The free plan suits individual operators and teams that can run source-distributed software and review their own migrations. There are no published seat or usage charges, but the project is obtained as source through GitHub or by cloning its repository, so setup and maintenance remain the user's responsibility.
Platforms
pgquarrel supports Linux, Windows, and self-hosted deployments. Cross-platform availability helps teams keep the comparison step near their existing administration or deployment environment. Distribution is source-based, and the latest listed release is 0.7.0, which includes fixes to Windows, Debian/Ubuntu, and FreeBSD builds.
Who it's for
Choose pgquarrel when you operate PostgreSQL across development, testing, staging, and production and need generated DDL rather than data-copy tooling. Its filters and output modes suit engineers comfortable with command-line automation and with inspecting SQL before execution. It is less suitable as the sole migration authority for databases that depend on roles, inheritance, or other partially supported object types, or where source and target PostgreSQL versions differ materially.
Pros and cons
Pros
- Free and permissively licensed: The BSD-3-Clause license and zero-price plan remove licensing cost for single-engine PostgreSQL deployments.
- Direct catalog comparison: Reading server metadata avoids a pg_dump-based workflow and keeps the tool centered on schema definitions.
- Useful deployment controls: Object filters, schema patterns, summaries, files, and single-transaction output adapt to scripted release processes.
- Clear data boundary: It generates DDL changes without altering table rows through data-manipulation commands.
Cons
- Incomplete object support: Partial coverage and missing inheritance and roles mean a diff may not represent the whole database.
- Version caveat: Output can fail to behave as expected when the source server is newer than the target.
- Source-based distribution: Installation and ongoing upkeep require comfort with repository-based software rather than a packaged commercial workflow.
Alternatives
For a wider category view, see Database Schema Comparison Tools.
- dbForge Studio for PostgreSQL is the better choice when you want a freemium product with a trial, visual editing, query history, and broader desktop platform coverage.
- Skeema fits teams needing a freemium workflow that includes tables, stored procedures and functions, and linter checks, with a paid Plus tier at $124 a month.
- apgdiff is another free, MIT-licensed PostgreSQL schema-diff tool for users seeking a different open-source implementation.
- sqldef suits users wanting a free open-source CLI with Linux, macOS, self-hosted, and Windows support.
- UserFolderMigrator is a free Windows-only utility for a different migration need.
- Windows Malicious Software Removal Tool is a free Windows malware-removal utility, not a schema comparison alternative.
- dbdiff offers another free schema-comparison option across Linux, macOS, self-hosted, and Windows.
- DBDiff is a free open-source project for users considering another general database-diff option.
Verdict
pgquarrel is a strong fit for PostgreSQL-focused teams that want a free, scriptable way to turn catalog differences into reviewable migration SQL. Its main reason to choose it is precise control over schema scope and output without licensing cost. Look elsewhere when complete coverage of PostgreSQL objects, cross-version certainty, or a packaged visual workflow is more important than a narrow command-line tool.
Alternatives to pgquarrel
- 1
dbForge Studio for PostgreSQL
Free planLinuxmacOSWindows7.5From $89.95 a year - 2

GitHub CodeQL
Free planWebExtensionLinuxmacOS7.5From $30 a month - 3
driftcurve
Free planOpen sourceWebAPISelf-hosted7.1Free plan - 4

Skeema
Free planLinuxmacOSWindows6.9From $649 a year - 5
SQL Delta
Windows6.8$185 one-time - 6

Altova DiffDog
Windows6.3$189 one-time
