X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C4447D1E92F for ; Sun, 29 Feb 2004 02:19:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 94119-02 for ; Sat, 28 Feb 2004 22:19:06 -0400 (AST) Received: from minotaur.posixnap.net (minotaur.posixnap.net [66.92.171.137]) by svr1.postgresql.org (Postfix) with SMTP id D0A2BD1D2BA for ; Sat, 28 Feb 2004 22:19:01 -0400 (AST) Received: (qmail 25548 invoked by uid 100); 29 Feb 2004 02:23:48 -0000 Date: Sat, 28 Feb 2004 21:23:48 -0500 From: "Alex J. Avriette" To: Tom Lane Cc: Mark Lubratt , pgsql-hackers@postgreSQL.org Subject: Re: [ADMIN] Schema comparisons Message-ID: <20040229022348.GL8646@posixnap.net> References: <25377.1077942505@sss.pgh.pa.us> <4F7D4521-69BC-11D8-ACD3-000A9579AF50@indeq.com> <27965.1077982780@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27965.1077982780@sss.pgh.pa.us> X-Operating-System: SunOS 5.9 Generic_112233-07 sparc X-GPG-Key: 6DF10473, http://envy.posixnap.net/~alex/pubkey.asc X-GPG: Encrypted communication preferred. User-Agent: Mutt/1.5.5i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/976 X-Sequence-Number: 50565 On Sat, Feb 28, 2004 at 10:39:40AM -0500, Tom Lane wrote: > >> Have you tried diffing pg_dump output? It's not the greatest tool but > >> it's helpful. > > > Yes, I did. It was quite cumbersome. Especially since the OIDs and > > TOC entry numbers didn't matchup; and, since those didn't always match, > > the order of objects wasn't quite the same either. So, diff was > > throwing a lot of false positives at me. > > Yeah. CVS-tip pg_dump doesn't show OIDs by default, to make it easier > to use for purposes like this. The ordering issue is the bigger problem > though. I presume that the object creation history is different in the > two databases and so pg_dump's habit of sorting by OID isn't helpful. I recently had to figure out what was different between the "live" schema and the schema in cvs at work. This was a really painful process, and it occurred to me that it wouldn't be terribly hard to write a perl program to do it (I wound up using vim and diff). Is there interest in such a tool? I could probably have one written within a day or two. Alex -- alex@posixnap.net Alex J. Avriette, Solaris Systems Masseur http://envy.posixnap.net/~alex/articles/nro-wahhabi.html