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 CFC9652AAD; Mon, 7 Mar 2005 12:55:28 +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 44432-06; Mon, 7 Mar 2005 12:55:19 +0000 (GMT) Received: from ucsns.ucs.co.za (ucs.co.za [196.23.43.2]) by svr1.postgresql.org (Postfix) with ESMTP id CC58156376; Mon, 7 Mar 2005 12:54:59 +0000 (GMT) Received: from ucspost.ucs.co.za (mailgw1.ucs.co.za [196.23.43.253]) by ucsns.ucs.co.za (Postfix) with ESMTP id 81DC92BD70; Mon, 7 Mar 2005 14:54:43 +0200 (SAST) Received: from jhb.ucs.co.za (jhb.ucs.co.za [172.31.1.3]) by ucspost.ucs.co.za (Postfix) with ESMTP id 43711D9F2C; Mon, 7 Mar 2005 14:54:44 +0200 (SAST) Received: from svb.ucs.co.za (svb.ucs.co.za [172.31.1.148]) by jhb.ucs.co.za (Postfix) with ESMTP id 880B9973EC; Mon, 7 Mar 2005 14:54:44 +0200 (SAST) Date: Mon, 7 Mar 2005 14:54:44 +0200 From: Stef To: Markus Schaber Cc: pgsql-ADMIN@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] Postgres schema comparison. Message-ID: <20050307145444.459e54fe@svb.ucs.co.za> In-Reply-To: <422C42B7.1030509@logix-tt.com> References: <20050307113312.2200b65c@svb.ucs.co.za> <422C42B7.1030509@logix-tt.com> X-Mailer: Sylpheed-Claws 1.0.1 (GTK+ 1.2.10; i386-pc-linux-gnu) User-Agent: sillypheed-claws (anti-aliased) X-Face: +lU/o'$=Zv9%Xjo]Kq[_{n&Kb`f{YEWH4&Y#M]'6BkD?VoWe#*@S\MWyD'I>s:0v4{#\[J]l*?]t2uaO(j$d*77Ca-UHo.tkl2)0$B3Jxww\o:xor]<:*Yfx9Vceh)9I/'2g\RKhGTxIIsR^ke^`LVeZ9ksb*:$kQeR@ X-Operating-System: sid X-X-X: _-^-_ Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.328 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_WHOIS X-Spam-Level: X-Archive-Number: 200503/77 X-Sequence-Number: 16575 Markus Schaber mentioned : => There are (at least) two independently developed pgdiff applications, => they can be found at: => => http://pgdiff.sourceforge.net/ => => http://gborg.postgresql.org/project/pgdiff/projdisplay.php Thanks a lot! => I did not try the first one, but the latter one worked on some of my => datas, but fails on others. I filed a bug report some time ago, but got => no answer, so I'm afraid this tool currently is unmaintained: => http://gborg.postgresql.org/project/pgdiff/bugs/bugupdate.php?895 => => But maybe a pg_dump --schema-only on all the databases, and then => manually diffing the files may already fulfil your needs. I've tested something similar, that seems to work ok for me for now : pg_dump -s -t [TABLE] [DBNAME] | grep -v "^--" | md5sum The problem I have with this, is that I have to run the command per table, and seeing that I have over 500 tables in each database, this takes quite a long time. I'll test some of the above pgdiffs, and see if either can do it better. Kind Regards Stefan