X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C6CD93ABB61 for ; Tue, 21 Dec 2004 04:46:58 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00867-01 for ; Tue, 21 Dec 2004 04:46:48 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by svr1.postgresql.org (Postfix) with ESMTP id 374D53ABB1B for ; Tue, 21 Dec 2004 04:46:47 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 58so112482wri for ; Mon, 20 Dec 2004 20:46:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=Zd8sBEC/U/9xNRsPcccIv9GddI1tLr0muJ8/4roaLO2s5S6ZjzCmUEoYN0jxXdbP9haPS9rGo5AIVE4Pr6EEcsVtBc44hAlEp0AhuvKWcmTSpTrPJd5Lhbu3Y611a6HNPDb5jWIbgxckmA7ldLfshuUFYCgGmdtFyVDA6zPXc0U= Received: by 10.54.42.70 with SMTP id p70mr202506wrp; Mon, 20 Dec 2004 20:46:46 -0800 (PST) Received: by 10.54.11.6 with HTTP; Mon, 20 Dec 2004 20:46:46 -0800 (PST) Message-ID: <37d451f704122020467fa9046b@mail.gmail.com> Date: Mon, 20 Dec 2004 22:46:46 -0600 From: Rosser Schwarz Reply-To: Rosser Schwarz To: Chris Hoover Subject: Re: Any tools to compare db's Cc: pgsql-admin@postgresql.org In-Reply-To: <41C76824.1030904@sermonaudio.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <37d451f70412200944b09c7d4@mail.gmail.com> <41C76824.1030904@sermonaudio.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200412/207 X-Sequence-Number: 15793 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