pgquarrel compares PostgreSQL database schemas and produces commands to make a target schema match a source. It connects directly to PostgreSQL servers and reads catalog metadata rather than relying on tools such as pg_dump. The project describes deploying schema changes to testing, staging, or production as its main use. Filters let users select object types and include or exclude schemas by pattern. Changes go to stdout by default, with options to save them to a file, print a summary, or output them as one transaction. pgquarrel does not manipulate table data with INSERT, UPDATE, DELETE, or COPY operations. Its documented object coverage is mixed: some types have complete support and others partial support, while inheritance and roles are identified as major omissions. Generated output may not work as expected if the source PostgreSQL version is newer than the target. The BSD-3-Clause licensed tool is free and distributed as source through GitHub or a Git clone. The listed latest release is 0.7.0.
Who it is for
pgquarrel suits PostgreSQL administrators and developers preparing schema changes for testing, staging, or production. It is intended for schema comparison, not table-data changes.
What is good
- Free and BSD-3-Clause licensed.
- Connects directly to PostgreSQL servers.
- Filters can narrow object and schema comparisons.
- Can output changes as a single transaction.
- Does not modify table data.
What to know first
- Inheritance and roles are listed as major omissions.
- Some PostgreSQL object types have only partial support.
- Output may not work as expected across newer-to-older versions.
- Distributed as source code through GitHub.
Verdict
pgquarrel focuses on comparing PostgreSQL schemas and generating change commands, with options for selective comparisons and output. Check its object coverage and PostgreSQL version caveat before relying on generated changes.
pgquarrel plans and pricing
All plansCompared on database schema comparison tools
- Free plan
- Yes
- Migration scripts
- Yes
- Database scope
- single-engine
- Supported platforms
- cross-platform
