Listing Child Tables of a Particular Parent
Listing Child Tables of a Particular Parent
От:
"Garcia, Joshua" <Joshua.Garcia@xerox.com>
Дата:
Hi everyone,
I’ve been trying to figure out how to get a list of all the child tables for a particular parent table. The websites I’ve looked at and the book I have haven’t been able to show me how I can do this. How can I get such a list?
Thanks in advance,
Josh
Re: Listing Child Tables of a Particular Parent
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Garcia, Joshua" 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