On Thu, 2002-07-04 at 21:14, Kevin Hyde wrote:
>
> I have a PostgreSQL database containing a number of tables.  How do I find
> out which tables are inherited to which?  And once I know that, how do I
> change(create or revoke) the inheritance?
SELECT   a.relname AS child,
         b.relname AS parent
  FROM   pg_class AS a,
         pg_class AS b,
         pg_inherits AS c
  WHERE  a.oid = c.inhrelid AND
         b.oid = c.inhparent;