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

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

From: Daniel Ariel <pgsqlinterfaces(at)netzach(dot)co(dot)il>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Obtaining information on the schema of tables which I do not own
Date: 2005-12-13 15:31:13
Message-ID: Pine.LNX.4.58.0512131730180.2876@perpetual.jerusalem.plus.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi all,

We are 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 reasons of security 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

pgsql-interfaces by date

Next:From: Peter EisentrautDate: 2005-12-13 20:44:03
Subject: Re: PL/Java for Debian Etch AMD64 / PostgreSQL 8.1?
Previous:From: Joost KraaijeveldDate: 2005-12-13 15:03:58
Subject: PL/Java for Debian Etch AMD64 / PostgreSQL 8.1?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group