Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Wed, 14 Dec 2005 11:39:55 -0600
  • Message-id: <20051214173955.GA9238@wolff.to> <text/plain>

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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group