你是什么意思“从SQL查询”?这是否意味着从pg_inherits中选择对你来说不够好?
SELECT pg_inherits.*,c.relname AS child,p.relname AS parent FROM pg_inherits JOIN pg_class AS c ON (inhrelid=c.oid) JOIN pg_class as p ON (inhparent=p.oid);