EVERYTHING XIAOMI
Get listed

apgdiff

apgdiff is a free command-line utility for comparing two PostgreSQL schema dump files.

Place
#8 of 25
Score
6.1
apgdiff's website

What apgdiff is

apgdiff is a free command-line utility for comparing two PostgreSQL schema dump files. Provide an original dump and a new one, and it generates DDL statements that can update the old schema or display the differences. You can print the generated SQL in the terminal or redirect it to a file; the project also describes calling apgdiff from batch jobs or web applications. It is written in Java and requires Java 1.6 or newer. The homepage lists Windows, Linux, Mac OS X, Solaris, and BSD, and says it can run on other systems with Java. The download page names version 2.4 as the latest stable release and offers binary and source ZIPs. Its supported SQL coverage includes selected ALTER, CREATE, COMMENT, and SET search_path statements. Other SQL statements are ignored, with an option to report ignored DDL. For CREATE TABLE column constraints, only NULL and NOT NULL are supported. The project uses the MIT License and directs bug reports and feature requests to GitHub Issues. Its usage guide advises reviewing generated upgrade statements and potentially trying them on another database before production use.

Good

  • Compares PostgreSQL schema dumps and generates DDL.
  • Generated SQL can be printed or saved to a file.
  • Runs on systems with Java 1.6 or newer.
  • MIT licensed, with binary and source downloads.

Watch out

  • Other SQL statements are ignored.
  • CREATE TABLE column constraints are limited to NULL and NOT NULL.
  • Command-line use may be inconvenient for some users.
  • Generated SQL should be reviewed before production use.

Who it suits

apgdiff is suited to PostgreSQL users comfortable with command-line tools who need generated schema-difference SQL. It can also be called from batch jobs or web applications.

Verdict

apgdiff provides a focused way to generate PostgreSQL schema-difference statements from dump files. Its selected statement coverage and command-line workflow make it important to review the output before applying changes.

Plans and prices

From apgdiff's own pricing page, checked 4 Oct 2026.

All about pricing
PlanPriceWhat it gives you
FreeFreeFree PostgreSQL schema diff tool · MIT licensed

The facts

Each one read from apgdiff's own pages, with the date it was checked.

What it does

Command line
apgdiff is a command-line tool run from a terminal and the homepage says it is useful to call from batches or web applications.checked 4 Oct 2026
Download
The download page identifies version 2.4 as the latest stable release and offers binary and source ZIP downloads.checked 4 Oct 2026
Feature constraint
For CREATE TABLE column constraints, the supported features page says only NULL and NOT NULL are supported.checked 4 Oct 2026
License
The project is licensed under the MIT License.checked 4 Oct 2026
Project activity
The project news page lists version 2.4 as released on 2012-09-21 and says the project moved to GitHub on 2012-08-03.checked 4 Oct 2026
Purpose
apgdiff compares two PostgreSQL database schema dump files and outputs DDL statements to update the old schema or show the differences.checked 4 Oct 2026
Review generated SQL
The usage guide recommends reviewing generated upgrade statements and possibly testing them on another database before applying them to production.checked 4 Oct 2026
Runtime
apgdiff is a Java program and its installation page requires Java 1.6 or newer.checked 4 Oct 2026
SQL coverage
The supported statements page lists support for selected ALTER SEQUENCE, ALTER TABLE, ALTER VIEW, COMMENT, CREATE FUNCTION, CREATE INDEX, CREATE SCHEMA, CREATE SEQUENCE, CREATE TABLE, CREATE TRIGGER, CREATE VIEW, and SET search_path statements.checked 4 Oct 2026
Support
The site directs users to GitHub Issues to report bugs or request features and lists the author’s email for comments and suggestions.checked 4 Oct 2026
Supported systems
The homepage lists Windows, Linux, Mac OS X, Solaris, and BSD, and says it can run on other systems where Java is available.checked 4 Oct 2026
Unsupported statements
Other SQL statements are ignored, and the --output-ignored-statements option reports DDL statements the tool currently ignores.checked 4 Oct 2026
Who it serves
The homepage says the command-line format suits users accustomed to command-line applications and may be inconvenient for users who are not.checked 4 Oct 2026
Workflow
It takes an original schema dump and a new schema dump as input, and can print the generated SQL or redirect it to a file.checked 4 Oct 2026

The company

Founded
2006checked 28 Sep 2026
The full review of apgdiff

Overview

apgdiff turns differences between two PostgreSQL schema dumps into SQL for updating the older schema. It is best suited to developers and database administrators comfortable with terminal workflows who need a focused migration step. Its free, MIT-licensed model is appealing, but its selective SQL coverage makes review of every generated change essential.

Supply an original dump and a newer dump, then print the generated statements or redirect them to a file. That straightforward input-and-output workflow can fit batch jobs or web applications, but apgdiff compares dump files rather than serving as a broader database-management environment. It supports PostgreSQL alone.

The project offers binary and source ZIP downloads, and identifies version 2.4 as its latest stable release. The project news dates that release to 2012-09-21, a long gap that teams should factor into decisions about an evolving migration workflow. Bug reports and feature requests go through GitHub Issues.

Key features

Supported statements include selected ALTER SEQUENCE, ALTER TABLE, ALTER VIEW, COMMENT, CREATE FUNCTION, CREATE INDEX, CREATE SCHEMA, CREATE SEQUENCE, CREATE TABLE, CREATE TRIGGER, CREATE VIEW, and SET search_path statements. For schema changes built from those constructs, apgdiff can produce upgrade DDL that can be saved as a migration script.

This is a defined subset, not comprehensive SQL coverage: other statements are ignored. The --output-ignored-statements option reports DDL that apgdiff currently skips, which can help surface gaps before a migration is applied. CREATE TABLE column constraints are narrower still: only NULL and NOT NULL are supported. The usage guide recommends reviewing generated upgrade statements and, where appropriate, testing them on another database before production use. That caution is central to using apgdiff safely, not an optional final check.

As a Java program, apgdiff requires Java 1.6 or newer. Its homepage names Windows, Linux, Mac OS X, Solaris, and BSD, and says it can run on other systems with Java. The terminal interface suits command-line users and can be inconvenient for those who prefer graphical tools.

Pricing

apgdiff is free: its Free plan costs nothing and includes the PostgreSQL schema-diff tool under the MIT License. There is no paid tier or free-trial decision to weigh; the trade-off is the tool’s narrow scope and the care required to validate its output.

Platforms

apgdiff runs on Linux, macOS, and Windows, with Java 1.6 or newer required. Its homepage also names Solaris and BSD, as well as other systems where Java is available. This broad runtime reach is useful for terminal-based workflows, but does not change its single-engine focus on PostgreSQL.

Who it's for

Choose apgdiff if you work comfortably at a command line and need to generate PostgreSQL schema-difference statements from two dump files, especially as one step in a batch or web-application workflow. It is a weaker fit if you need a graphical interface, broad SQL coverage, or a tool with a more recent stable release.

Pros and cons

  • Pros: Free and MIT licensed, with generated SQL that can be printed or saved as a migration script.
  • Pros: The ignored-statement reporting option makes some coverage gaps visible during review.
  • Cons: Unsupported statements are ignored, and CREATE TABLE column constraints cover only NULL and NOT NULL.
  • Cons: Generated SQL needs careful review and potentially separate-database testing before production use.
  • Cons: The terminal workflow may be inconvenient for non-command-line users, and version 2.4 dates to 2012.

Alternatives

Browse database schema comparison tools if you want to compare more options before settling on a PostgreSQL dump-based workflow.

Consider Skeema if you want a freemium option with a free Community plan covering tables, stored procedures and functions, and 18 linter checks; its Plus plan is $124 a month. Choose dbForge Studio for PostgreSQL if a freemium tool with a free, limited-functionality Express plan and a free trial better fits your evaluation; its Standard plan is $89.95 a year.

sqldef is another free, MIT-licensed command-line option for readers considering schema comparison tools. pgquarrel is a free, BSD-3-Clause-licensed alternative. dbdiff and DBDiff are also free alternatives. For a self-hosted option with a free plan and no accounts in default local mode, consider driftcurve. Redgate SQL Provision is a paid alternative with capacity tiers based on total production data volume to provision or mask; its price is custom pricing.

Verdict

apgdiff is a sensible pick for a technically comfortable user who needs a free, focused way to derive PostgreSQL upgrade statements from schema dumps. Its strongest reason to choose it is that direct, scriptable workflow; its strongest reason to look elsewhere is the selective coverage, which makes unreviewed output unsafe to treat as a complete migration.

Getting started

  1. Open https://github.com/fordfrog/apgdiff.
  2. Download the binary or source ZIP for version 2.4.
  3. Install Java 1.6 or newer.
  4. Run apgdiff from a terminal with the original and new schema dumps.
  5. Review the generated upgrade statements before applying them.

Limits worth knowing

apgdiff ignores SQL statements outside its supported set, and CREATE TABLE column constraints support only NULL and NOT NULL. Its usage guide recommends reviewing generated upgrade statements and possibly testing them on another database before production use.

Questions

How much does apgdiff cost?

The Free plan costs nothing.

What database does apgdiff support?

It compares PostgreSQL database schema dump files.

What systems can run apgdiff?

The homepage lists Windows, Linux, Mac OS X, Solaris, and BSD, as well as other systems where Java is available.

Does apgdiff require Java?

Yes. It is a Java program, and the installation page requires Java 1.6 or newer.

What license does apgdiff use?

The project is licensed under the MIT License.

Does apgdiff handle every SQL statement?

No. It supports selected statements and ignores others; an option reports ignored DDL statements.

Alternatives to apgdiff

All alternatives
  1. 1

    dbForge Studio for PostgreSQL

    Free planLinuxmacOSWindows
    7.5From $89.95 a year
  2. 2GitHub CodeQL logo

    GitHub CodeQL

    Free planWebExtensionLinuxmacOS
    7.5From $30 a month
  3. 3

    driftcurve

    Free planOpen sourceWebAPISelf-hosted
    7.1Free plan
  4. 4Skeema logo

    Skeema

    Free planLinuxmacOSWindows
    6.9From $649 a year
  5. 5

    SQL Delta

    Windows
    6.8$185 one-time
  6. 6Altova DiffDog logo
    6.3$189 one-time