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 00DE756477; Mon, 7 Mar 2005 15:32:23 +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 94548-06; Mon, 7 Mar 2005 15:32:16 +0000 (GMT) Received: from a2s1.a2webhosting.com (host-180.a2webhosting.com [69.39.89.180]) by svr1.postgresql.org (Postfix) with ESMTP id 28F6D56458; Mon, 7 Mar 2005 15:32:15 +0000 (GMT) Received: from user-1120o41.dsl.mindspring.com ([66.32.96.129] helo=[192.168.1.10]) by a2s1.a2webhosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.44) id 1D8KDU-0000QR-7C; Mon, 07 Mar 2005 10:32:20 -0500 In-Reply-To: <20050307170914.51376f05@svb.ucs.co.za> References: <20050307113312.2200b65c@svb.ucs.co.za> <20050307170914.51376f05@svb.ucs.co.za> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <1098CCF1-8F1E-11D9-A12B-000A95B03262@pgedit.com> Content-Transfer-Encoding: 7bit Cc: pgsql-ADMIN@postgresql.org, pgsql-sql@postgresql.org From: John DeSoi Subject: Re: Postgres schema comparison. Date: Mon, 7 Mar 2005 10:32:07 -0500 To: Stef X-Mailer: Apple Mail (2.619) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s1.a2webhosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/87 X-Sequence-Number: 16585 On Mar 7, 2005, at 10:09 AM, Stef wrote: > 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? > I'm not sure you can use \d directly, but if you startup psql with the -E option it will show you all the SQL it is using to run the \d command. It should be fairly easy to get the strings you need from the results of running a similar query. The psql source is a good place to look also. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL