Re: Obtaining information on the schema of tables which I do not own

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Daniel Ariel <pgsqlinterfaces(at)netzach(dot)co(dot)il>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Obtaining information on the schema of tables which I do not own
Date: 2005-12-14 17:39:55
Message-ID: 20051214173955.GA9238@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Mon, Dec 12, 2005 at 23:02:52 +0200,
Daniel Ariel <pgsqlinterfaces(at)netzach(dot)co(dot)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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2005-12-14 18:08:06 Re: Obtaining information on the schema of tables which I do not own
Previous Message Peter Eisentraut 2005-12-13 20:44:03 Re: PL/Java for Debian Etch AMD64 / PostgreSQL 8.1?