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 D653DD1E2E6 for ; Sat, 28 Feb 2004 18:00:07 +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 85339-03 for ; Sat, 28 Feb 2004 14:00:04 -0400 (AST) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr1.postgresql.org (Postfix) with ESMTP id 777DCD1E2E2 for ; Sat, 28 Feb 2004 14:00:03 -0400 (AST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 1Ax8ks-0007vu-0Y; Sat, 28 Feb 2004 18:00:02 +0000 Received: by mainbox.archonet.com (Postfix, from userid 529) id 4DB531741A; Sat, 28 Feb 2004 18:00:01 +0000 (GMT) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 795A417228; Sat, 28 Feb 2004 17:59:58 +0000 (GMT) From: Richard Huxton To: Tom Lane , Mark Lubratt Subject: Re: [ADMIN] Schema comparisons Date: Sat, 28 Feb 2004 17:59:50 +0000 User-Agent: KMail/1.5 Cc: pgsql-hackers@postgresql.org References: <4F7D4521-69BC-11D8-ACD3-000A9579AF50@indeq.com> <27965.1077982780@sss.pgh.pa.us> In-Reply-To: <27965.1077982780@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402281759.50389.dev@archonet.com> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.3 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/940 X-Sequence-Number: 50529 On Saturday 28 February 2004 15:39, Tom Lane wrote: > Mark Lubratt writes: > > On Feb 27, 2004, at 10:28 PM, Tom Lane wrote: > >> Mark Lubratt writes: > >>> I've been trying to be careful, but I've gotten out of synch with > >>> whether or not I've applied the changes I've made to the development > >>> system to the production system. Is there a utility that will compare > >>> the tables, functions, trigger, views, etc. between two systems and > >>> flag the schema elements that aren't in synch between the two? > >> > >> Have you tried diffing pg_dump output? It's not the greatest tool but > >> it's helpful. > Comments? Anyone see a reason not to do this? It would help me out too - I have similar problems to Mark with keeping various copies in sync. I've been looking at storing $REVISION$ in comments for each object, so my install scripts can halt if there is a problem. Not wanting to use my only comment slot for this I was thinking about an extension to the COMMENT ON statement: COMMENT ON TABLE foo IS 'This is where I stroe my foos.'; COMMENT ON TABLE foo SECTION 'default' IS 'I meant store my foos.'; COMMENT ON TABLE foo SECTION 'revision' IS '1.19'; COMMENT ON TABLE foo SECTION 'bar' IS 'baz';