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 A38FF564C8; Mon, 7 Mar 2005 15:09:32 +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 86576-01; Mon, 7 Mar 2005 15:09:23 +0000 (GMT) Received: from ucsns.ucs.co.za (ucs.co.za [196.23.43.2]) by svr1.postgresql.org (Postfix) with ESMTP id EE57E5648C; Mon, 7 Mar 2005 15:09:18 +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 611F22BD59; Mon, 7 Mar 2005 17:09:14 +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 B7C8DD9F2C; Mon, 7 Mar 2005 17:09:12 +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 4BA57973EC; Mon, 7 Mar 2005 17:09:14 +0200 (SAST) Date: Mon, 7 Mar 2005 17:09:14 +0200 From: Stef To: John DeSoi Cc: pgsql-ADMIN@postgresql.org, pgsql-sql@postgresql.org Subject: Re: Postgres schema comparison. Message-ID: <20050307170914.51376f05@svb.ucs.co.za> In-Reply-To: References: <20050307113312.2200b65c@svb.ucs.co.za> 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.32 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_WHOIS X-Spam-Level: X-Archive-Number: 200503/84 X-Sequence-Number: 16582 John DeSoi mentioned : => Develop a function that builds a string describing the tables/schemas => you want to compare. Then have your function return the md5 sum of the => string as the result. This will give you a 32 character value you can => use to determine if there is a mismatch. OK, this may be exactly what I need. I've compiled and installed contrib/pgcrypto and I want to use either one of : Result data type | Schema | Name | Argument data types ------------------+--------+--------+--------------------- bytea | public | digest | bytea, text bytea | public | digest | text, text Is it possible to somehow pass the output of : "\d [TABLE NAME]" to this function? If not, what would return me consistent text that will describe the columns, indexes and primary keys of a table? Kind Regards Stefan