Another PostgreSQL Diff Tool (apgdiff) free database schema diff tool

Awards

Famous Software Download

How It Works

apgdiff is a command-line tool which means you have to run it from terminal window. Basically, it takes two parameters to run. One is the original database schema dump file, the other is the new database schema dump file. The command might look like this:

java -jar apgdiff-2.4.jar original_schema_dump.sql new_schema_dump.sql

After you submit the command, you will see list of SQL statements and modification information on the screen (see Screenshots page for examples). You can also redirect the output to a file (must be entered on single line):

java -jar apgdiff-2.4.jar original_schema_dump.sql new_schema_dump.sql > diff.sql

For more information about program usage run apgdiff without parameters:

java -jar apgdiff-2.4.jar

The output will be this:

Usage: apgdiff [options] <old_dump> <new_dump>

Options:

--version:
	displays apgdiff version

--add-defaults:
	adds DEFAULT ... in case new column has NOT NULL constraint but no default
	value (the default value is dropped later)

--add-transaction:
	adds START TRANSACTION and COMMIT TRANSACTION to the generated diff file

--ignore-function-whitespace:
	ignores multiple spaces and new lines when comparing content of functions
	- WARNING: this maycause functions to appear to be same in cases they are
	not, so use this feature only if you know what you are doing

--ignore-start-with:
	ignores START WITH modifications on SEQUENCEs (default is not to ignore
	these changes)

--in-charset-name <charset>:
	charset that should be used for reading input files (standard charset name
	supported by Java, default is UTF-8)

--out-charset-name <charset>:
	charset that should be used for writing output (standard charset name
	supported by Java, default is UTF-8)

--output-ignored-statements:
	outputs information about DDL statements that apgdiff ignores at this
	moment (it will not output any SELECT, INSERT, UPDATEand/or DELETE
	statements)

--ignore-slony-triggers:
        when parsing SQL statements, ignores Slony triggers named _slony_logtrigger
        and _slony_denyaccess

--list-charsets
        lists all supported charsets
Download
Another PostgreSQL Diff Tool
Version 2.4