Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

apgdiff

github.com

  • Free plan
  • Windows
  • macOS
  • Linux
7.6 Club score Visit github.com

What apgdiff is

apgdiff compares two PostgreSQL schema dump files and produces DDL statements that can update the older schema or display differences. Provide an original dump and a new dump; the generated SQL can appear in the terminal or be redirected to a file. It runs from the command line, and its homepage describes using it in batch jobs or web applications. The program is written in Java and requires Java 1.6 or newer. The download page identifies version 2.4 as the latest stable release and offers binary and source ZIPs. Its supported SQL includes selected ALTER, CREATE, COMMENT, and SET search_path statements. Other statements are ignored, and an option reports ignored DDL. For CREATE TABLE column constraints, support covers only NULL and NOT NULL. apgdiff is free under the MIT License and lists Windows, Linux, Mac OS X, Solaris, and BSD, as well as other systems with Java. Its usage guide recommends reviewing generated upgrade SQL and potentially trying it on another database before production use.

Who it suits

It suits PostgreSQL users comfortable with command-line tools who need to compare schema dumps or generate migration scripts. Users who prefer a graphical interface may find its command-line format inconvenient.

Good to know, and what to watch

  • Free and MIT licensed.
  • Generates SQL to update or compare schemas.
  • Generated SQL can be redirected to a file.
  • Supports Windows, Linux, macOS, Solaris, and BSD.
  • Other SQL statements are ignored.
  • Column constraints support only NULL and NOT NULL.
  • Requires Java 1.6 or newer.
  • Latest stable release listed is version 2.4.

Free

Free

Free plan

Getting started

  1. Install Java 1.6 or newer
  2. Download the version 2.4 binary ZIP or source ZIP
  3. Run apgdiff from a terminal on Windows, Linux, Mac OS X, Solaris, BSD, or another Java-supported system
  4. Provide the original and new PostgreSQL schema dump files
  5. Print the generated SQL or redirect it to a file
  6. Review the upgrade statements before applying them

Limits to check

The free tool supports only the SQL statements listed by the project. Other statements are ignored, and CREATE TABLE column constraints are limited to NULL and NOT NULL.

The verdict

apgdiff offers a focused way to generate PostgreSQL schema-change SQL from two dump files. Review the output and consider testing it on another database before applying it in production.

Questions people ask

What does apgdiff compare?

It compares two PostgreSQL database schema dump files and generates DDL to update the old schema or show differences.

How much does apgdiff cost?

The listed Free plan costs nothing. The project is MIT licensed.

Which systems can run it?

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

What Java version is required?

The installation page requires Java 1.6 or newer.

How is generated SQL handled?

You can print it in the terminal or redirect it to a file. The usage guide recommends reviewing it and possibly testing it on another database before production.

Where are bugs and feature requests reported?

The project directs users to GitHub Issues for bug reports and feature requests.

What the maker publishes

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. source
Download
The download page identifies version 2.4 as the latest stable release and offers binary and source ZIP downloads. source
Feature constraint
For CREATE TABLE column constraints, the supported features page says only NULL and NOT NULL are supported. source
Founded
2006 source
License
The project is licensed under the MIT License. source
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. source
Purpose
apgdiff compares two PostgreSQL database schema dump files and outputs DDL statements to update the old schema or show the differences. source
Review generated SQL
The usage guide recommends reviewing generated upgrade statements and possibly testing them on another database before applying them to production. source
Runtime
apgdiff is a Java program and its installation page requires Java 1.6 or newer. source
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. source
Support
The site directs users to GitHub Issues to report bugs or request features and lists the author’s email for comments and suggestions. source
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. source
Unsupported statements
Other SQL statements are ignored, and the --output-ignored-statements option reports DDL statements the tool currently ignores. source
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. source
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. source

Checked against the maker's pages on 4 Oct 2026.