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

From Andre Majorel
Subject Inspecting a DB - psql or system tables ?
Date
Msg-id 20110527172456.GC6769@aym.net2.nerim.net
Whole thread Raw
Responses Re: Inspecting a DB - psql or system tables ?  (Tomas Vondra <tv@fuzzy.cz>)
Re: Inspecting a DB - psql or system tables ?  (Greg Smith <greg@2ndQuadrant.com>)
List pgsql-general
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.

Would you look at the system tables (pg_class et al.) or the
output of psql \d, \dt, etc ?

While parsing the output of psql is cumbersome, accessing the
system tables seems more likely to break whenever a new version
of PostgreSQL comes out.

--
André Majorel http://www.teaser.fr/~amajorel/

pgsql-general by date:

Previous
From: Emi Lu
Date:
Subject: 500KB PDF files for postgresql8.3, which is the most efficient way?
Next
From: fork
Date:
Subject: Re: Inspecting a DB - psql or system tables ?