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 t
Andre Majorel 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
Dne 27.5.2011 19:24, Andre Majorel napsal(a):
> 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
On Fri, May 27, 2011 at 08:26:33PM +0200, Tomas Vondra wrote:
> > 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.
>
> Really? Those catalogs are pretty stable, and when changed they're
>
On 05/27/2011 01:24 PM, Andre Majorel wrote:
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.
I think you have this backwards. If there's a change in this area big
enough to justify chang
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Andrew Sullivan
> Sent: Friday, May 27, 2011 2:32 PM
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Inspecting a DB - psql or system ta