Re: Querying for related tables

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Craig <postgresql(at)bryden(dot)co(dot)za>, PG-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Querying for related tables
Date: 2005-11-03 20:23:57
Message-ID: 20051103202357.GC55520@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 03, 2005 at 05:10:44PM +0000, Richard Huxton wrote:
> Craig wrote:
> >Hi
> >
> >How can I query for all the tables that are referenced by a particular
> >table (i.e my table has 3 foreign keys. I need a query that will return
> >the table names of the referenced tables)?
>
> See the chapters on the "Information Schema" (which is an SQL standard)
> and the "system catalogs" (which are PostgreSQL specific).

See also http://pgfoundry.org/projects/newsysviews
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bricklen Anderson 2005-11-03 20:25:19 Re: how to emit line number in a function?
Previous Message Jim C. Nasby 2005-11-03 20:23:16 Re: Save prepared plan...