Re: Any tools to compare db's

From: Rosser Schwarz <rosser(dot)schwarz(at)gmail(dot)com>
To: Chris Hoover <revoohc(at)sermonaudio(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Any tools to compare db's
Date: 2004-12-21 04:46:46
Message-ID: 37d451f704122020467fa9046b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

while you weren't looking, Chris Hoover wrote:

> That really does not work. It will tell you line by line differences,
> but not what object it is. Also, it does not help to generate the sql
> to sync the db's.

There are graphical diff tools that will show the relationships
between the various blocks in two files. gtkdiff, for example, has
generally been pretty good in my experience. You should also be able
to tell diff how many lines of context you want to see. (Even that
might not be sufficient, though. We have a few two hundred-odd column
tables; allowing enough context to cover those cases, you might as
well be reading the whole schema yourself and writing down the
differences.)

As for generating the SQL, you're asking for something one might
expect from an ER tool; you might similarly expect to pay quite a bit
for it. IIRC, DataArchitect (q.v., at thekompany.com) may have
something to that effect in a forthcoming release, but I've never had
much -- read, any -- success getting the app to work -- read, even
connect. It's too bad, too; the tool looks pretty slick otherwise.

If nothing else, you might be able to kludge together a fix between
what works in EMS' product (which a colleague uses and swears by) to
sync the relations, and saying

pg_dump --schema-only database | grep GRANT - > grants.sql

on the "correct" database. Then sync your permissions by running the
grants script against the less correct one. There may also be
additional steps; I don't know if EMS' tool will also sync users and
groups, as just one quick example.

Nothing I'm aware of will do it in a click or three, though.

/rls

--
:wq

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message lise chhay 2004-12-21 11:58:54 unsubscribe pgsql-admin
Previous Message Chris Hoover 2004-12-21 00:02:44 Re: Any tools to compare db's