X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6F32F9DC84F for ; Tue, 13 Dec 2005 11:08:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76378-09 for ; Tue, 13 Dec 2005 11:08:00 -0400 (AST) X-Greylist: delayed 18:27:55.366056 by SQLgrey- Received: from smtp2.actcom.co.il (smtp2.actcom.co.il [192.114.47.35]) by postgresql.org (Postfix) with ESMTP id 865789DC80C for ; Tue, 13 Dec 2005 11:07:52 -0400 (AST) Received: from perpetual.jerusalem.plus.com (l192-117-127-144.broadband.actcom.net.il [192.117.127.144]) by smtp2.actcom.co.il (8.13.3/8.13.3) with ESMTP id jBDF7mhL014197 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 13 Dec 2005 17:07:54 +0200 Received: from daniel (helo=localhost) by perpetual.jerusalem.plus.com with local-esmtp (Exim 4.50) id 1EmC7W-0006o6-1V for pgsql-interfaces@postgresql.org; Tue, 13 Dec 2005 17:31:14 +0200 Date: Tue, 13 Dec 2005 17:31:13 +0200 (IST) From: Daniel Ariel X-X-Sender: daniel@perpetual.jerusalem.plus.com To: pgsql-interfaces@postgresql.org Subject: Obtaining information on the schema of tables which I do not own Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.224 required=5 tests=[AWL=0.224] X-Spam-Score: 0.224 X-Spam-Level: X-Archive-Number: 200512/15 X-Sequence-Number: 5883 Hi all, We are currently developing an application which needs to know information about table schema in order to display them correctly (specificly foreign keys, default values and not null characteristics). For reasons of security I would prefer for it not to run as superuser. I may often wish to display tables which I do not own and potentially not even have anything other than SELECT permissions to. I will need the schema information for these tables. It is desirable since the app needs to also work with other DB's besides postgres, to implement the requirements using as standard a technique as possible, and consequently the views inside information_schema look to me to be the best option. The problem is that as best as I can tell from experimentation and reading the documentation, I am only given information on tables owned by the current user. Is there any way to achieve I want without being forced to use the postgres-specific system tables ? Your assistance is much appreciated, Daniel