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 9FDCF9DD879 for ; Mon, 12 Dec 2005 19:40:37 -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 51221-04 for ; Mon, 12 Dec 2005 19:40:39 -0400 (AST) X-Greylist: delayed 03:00:34.316703 by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by postgresql.org (Postfix) with ESMTP id 1409E9DD5A0 for ; Mon, 12 Dec 2005 19:40:34 -0400 (AST) Received: from smtp4.actcom.co.il (mail.actcom.co.il [192.114.47.66]) by svr2.postgresql.org (Postfix) with ESMTP id 108D4F0B5A for ; Mon, 12 Dec 2005 20:40:00 +0000 (GMT) Received: from perpetual.jerusalem.plus.com (l192-117-99-181.broadband.actcom.net.il [192.117.99.181]) by smtp4.actcom.co.il (8.13.3/8.13.3) with ESMTP id jBCKdhpv023691 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 12 Dec 2005 22:39:52 +0200 Received: from daniel (helo=localhost) by perpetual.jerusalem.plus.com with local-esmtp (Exim 4.50) id 1Eluou-0004JX-Jg for pgsql-interfaces@postgresql.org; Mon, 12 Dec 2005 23:02:52 +0200 Date: Mon, 12 Dec 2005 23:02:52 +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 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/17 X-Sequence-Number: 5885 Dear list, I am 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 security reasons 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