Re: Any tools to compare db's
От | Rosser Schwarz |
---|---|
Тема | Re: Any tools to compare db's |
Дата | |
Msg-id | 37d451f704122020467fa9046b@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Any tools to compare db's ("Chris Hoover" <revoohc@sermonaudio.com>) |
Список | 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
В списке pgsql-admin по дате отправления: