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 3BA7C563EF; Tue, 8 Mar 2005 08:00:21 +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 80092-03; Tue, 8 Mar 2005 08:00:16 +0000 (GMT) Received: from ucsns.ucs.co.za (ucs.co.za [196.23.43.2]) by svr1.postgresql.org (Postfix) with ESMTP id CACD8564A5; Tue, 8 Mar 2005 08:00:12 +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 A4CA72BD6C; Tue, 8 Mar 2005 09:59:59 +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 BD9CAD9F2C; Tue, 8 Mar 2005 10:00:00 +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 95462973EC; Tue, 8 Mar 2005 10:00:00 +0200 (SAST) Date: Tue, 8 Mar 2005 10:00:00 +0200 From: Stef To: jim@contactbda.com Cc: pgsql-sql@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [SQL] Postgres schema comparison. Message-ID: <20050308100000.64674fec@svb.ucs.co.za> In-Reply-To: <20050307160942.M57950@contactbda.com> References: <20050307113312.2200b65c@svb.ucs.co.za> <422C42B7.1030509@logix-tt.com> <20050307145444.459e54fe@svb.ucs.co.za> <22961.1110205853@sss.pgh.pa.us> <20050307173155.285dc2eb@svb.ucs.co.za> <20050307160942.M57950@contactbda.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.324 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_WHOIS X-Spam-Level: X-Archive-Number: 200503/112 X-Sequence-Number: 16610 Jim Buttafuoco mentioned : => I use dblink to attach to both databases and query pg_namespace, pg_class, pg_attribute ... to get the diffs. See => attached as an example. look for the dblink_connect lines to specify your database. You will need to install => contrib/dblink. I used this with 7.4.X series and have NOT tested yet with 8.0.X. Thanks! This is something I haven't even thought of. Only some of the machines have dblink installed at the moment, but that's the same work as having to install pgcrypto everywhere. This is actually more thorough. It seems to be working with some minor changes on 7.3 (The dblink functions don't allow multiple connections, and take only one argument, so I created temp tables in stead). This is actually very fast. Thanks again. Kind Regards Stefan