Re: Obtaining information on the schema of tables which I do not own - Mailing list pgsql-interfaces

From Bruno Wolff III
Subject Re: Obtaining information on the schema of tables which I do not own
Date
Msg-id 20051214173955.GA9238@wolff.to
Whole thread Raw
In response to Obtaining information on the schema of tables which I do not own  (Daniel Ariel <pgsqlinterfaces@netzach.co.il>)
Responses Re: Obtaining information on the schema of tables which I do not own
List pgsql-interfaces
On Mon, Dec 12, 2005 at 23:02:52 +0200, Daniel Ariel <pgsqlinterfaces@netzach.co.il> wrote:
> 
> 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.

You don't have to be a superuser to see the catalog tables. In fact people
sometimes complain about that.

> 
> 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.

Probably you should start by seeing if the information schema provides what
you need:
http://developer.postgresql.org/docs/postgres/information-schema.html

If you need more than that, then you probably want to look at the documentation
for the system catalogs:
http://developer.postgresql.org/docs/postgres/catalogs.html


pgsql-interfaces by date:

Previous
From: Daniel Ariel
Date:
Subject: Obtaining information on the schema of tables which I do not own
Next
From: Tom Lane
Date:
Subject: Re: Obtaining information on the schema of tables which I do not own