Re: [SQL] Postgres schema comparison.

From: Stef <svb(at)ucs(dot)co(dot)za>
To: Markus Schaber <schabi(at)logix-tt(dot)com>
Cc: pgsql-ADMIN(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Postgres schema comparison.
Date: 2005-03-07 12:54:44
Message-ID: 20050307145444.459e54fe@svb.ucs.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Markus Schaber mentioned :
=> There are (at least) two independently developed pgdiff applications,
=> they can be found at:
=>
=> http://pgdiff.sourceforge.net/
=>
=> http://gborg.postgresql.org/project/pgdiff/projdisplay.php

Thanks a lot!

=> I did not try the first one, but the latter one worked on some of my
=> datas, but fails on others. I filed a bug report some time ago, but got
=> no answer, so I'm afraid this tool currently is unmaintained:
=> http://gborg.postgresql.org/project/pgdiff/bugs/bugupdate.php?895
=>
=> But maybe a pg_dump --schema-only on all the databases, and then
=> manually diffing the files may already fulfil your needs.

I've tested something similar, that seems to work ok for me for now :
pg_dump -s -t [TABLE] [DBNAME] | grep -v "^--" | md5sum

The problem I have with this, is that I have to run the command per table,
and seeing that I have over 500 tables in each database, this takes quite a
long time.

I'll test some of the above pgdiffs, and see if either can do it better.

Kind Regards
Stefan

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Richard_D_Levine 2005-03-07 13:03:43 Re: [SQL] Postgres schema comparison.
Previous Message John DeSoi 2005-03-07 12:39:30 Re: Postgres schema comparison.

Browse pgsql-sql by date

  From Date Subject
Next Message KÖPFERL Robert 2005-03-07 13:03:09 Maintaining production DBs, making one schema look like the other
Previous Message John DeSoi 2005-03-07 12:39:30 Re: Postgres schema comparison.