Re: Listing Child Tables of a Particular Parent

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Garcia, Joshua" <Joshua(dot)Garcia(at)xerox(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Listing Child Tables of a Particular Parent
Date: 2006-06-22 18:28:04
Message-ID: 2130.1151000884@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Garcia, Joshua" <Joshua(dot)Garcia(at)xerox(dot)com> writes:
> I've been trying to figure out how to get a list of all the child tables
> for a particular parent table.

You'd need to join pg_inherits to pg_class (twice). See
http://www.postgresql.org/docs/8.1/static/catalogs.html
(adjust link in the obvious way for older PG versions)

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2006-06-22 20:31:43 Copy Data Question
Previous Message Garcia, Joshua 2006-06-22 17:43:03 Listing Child Tables of a Particular Parent