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 0717CD1D169 for ; Sun, 29 Feb 2004 16:59:45 +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 25748-10 for ; Sun, 29 Feb 2004 12:59:41 -0400 (AST) Received: from lakemtao04.cox.net (lakemtao04.cox.net [68.1.17.241]) by svr1.postgresql.org (Postfix) with ESMTP id BEC64D1B83D for ; Sun, 29 Feb 2004 12:59:40 -0400 (AST) Received: from [192.168.0.13] ([68.105.168.67]) by lakemtao04.cox.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP id <20040229165940.HZHY10652.lakemtao04.cox.net@[192.168.0.13]>; Sun, 29 Feb 2004 11:59:40 -0500 From: Robert Treat To: "Alex J. Avriette" , Tom Lane Subject: Re: [ADMIN] Schema comparisons Date: Sun, 29 Feb 2004 11:59:37 -0500 User-Agent: KMail/1.5 Cc: Mark Lubratt , pgsql-hackers@postgreSQL.org References: <27965.1077982780@sss.pgh.pa.us> <20040229022348.GL8646@posixnap.net> In-Reply-To: <20040229022348.GL8646@posixnap.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402291159.37530.xzilla@users.sourceforge.net> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/987 X-Sequence-Number: 50576 On Saturday 28 February 2004 21:23, Alex J. Avriette wrote: > 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. > I've gone the vim-diff route in the past myself, but a nice command line tool to do it written in perl could certianly be nice. If nothing else you could toss it up on gborg. Incidentally I think there is already a tool that does this on sourceforge, but it uses tcl and requires a running webserver, so it's a little overbearing for most peoples needs imho. Robert Treat -- Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL