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 4EBE59DC86B for ; Wed, 14 Dec 2005 14:08:12 -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 44857-01 for ; Wed, 14 Dec 2005 14:08:10 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 0FC679DC830 for ; Wed, 14 Dec 2005 14:08:08 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jBEI86GG022358; Wed, 14 Dec 2005 13:08:06 -0500 (EST) To: Bruno Wolff III cc: Daniel Ariel , pgsql-interfaces@postgresql.org, Peter Eisentraut Subject: Re: Obtaining information on the schema of tables which I do not own In-reply-to: <20051214173955.GA9238@wolff.to> References: <20051214173955.GA9238@wolff.to> Comments: In-reply-to Bruno Wolff III message dated "Wed, 14 Dec 2005 11:39:55 -0600" Date: Wed, 14 Dec 2005 13:08:06 -0500 Message-ID: <22357.1134583686@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.002 required=5 tests=[AWL=0.002] X-Spam-Score: 0.002 X-Spam-Level: X-Archive-Number: 200512/19 X-Sequence-Number: 5887 Bruno Wolff III writes: > Daniel Ariel wrote: >> 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). > Probably you should start by seeing if the information schema provides what > you need: > http://developer.postgresql.org/docs/postgres/information-schema.html I think what he was complaining about was that information_schema restricts access to many things unless you are the table owner. This is per SQL99, but SQL2003 seems to have relaxed the rules to allow you to see info about tables you can access (ie, have nonzero rights for). Updating the information_schema to follow the SQL2003 rules is on the to-do list, but I dunno if anyone is actively working on it. (Peter?) regards, tom lane