PostgreSQL: Displaying inheritance relationship? I want to know if a certain PostgreSQL table is a part of any inheritance relationship (i.e. is a parent or a child of other table(s)).

Is there a query for that? Where is the inheritance data stored?
SELECT relname 
FROM pg_class c,pg_inherits i 
WHERE c.oid=i.inhrelid;


I am the guy that asked Adam about this, I found a solution so I added it here for future reference of others.