Re: Inspecting a DB - psql or system tables ? - Mailing list pgsql-general

From fork
Subject Re: Inspecting a DB - psql or system tables ?
Date
Msg-id loom.20110527T195331-496@post.gmane.org
Whole thread Raw
In response to Inspecting a DB - psql or system tables ?  (Andre Majorel <aym-2lqsgp@teaser.fr>)
List pgsql-general
Andre Majorel <aym-2lqsgp <at> teaser.fr> writes:

>
> Suppose you want to write a program that connects to a
> PostgreSQL database and lists its tables and views, the type of
> their columns and their relationships (REFERENCES) for automatic
> joins.

I personally would try to hit the "informat_schema", which is a bunch of views
on system activity that follows a standard. I am not sure if what you want is in
there, like locks or other stuff, but for table names etc it works well.

pgsql-general by date:

Previous
From: Andre Majorel
Date:
Subject: Inspecting a DB - psql or system tables ?
Next
From: Tomas Vondra
Date:
Subject: Re: Inspecting a DB - psql or system tables ?