Re: Querying for related tables

From: Richard Huxton <dev(at)archonet(dot)com>
To: Craig <postgresql(at)bryden(dot)co(dot)za>
Cc: PG-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Querying for related tables
Date: 2005-11-03 17:10:44
Message-ID: 436A4494.9080903@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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).

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bricklen Anderson 2005-11-03 17:25:27 Re: how to emit line number in a function?
Previous Message Richard Huxton 2005-11-03 17:03:40 Re: how to emit line number in a function?