I have a question about pg_depends, namely how do you identify the dependency
tied to a given relationship. Specifically to handle DROP INHERITS. Is there
any other reason there might be a dependency between two tables other than
inheritance? If there was how would you tell the dependencies apart?

Also, it seems to me the INHRELID syscache is entirely pointless. There isn't
a single consumer of it throughout the source tree. Nor can I think of any
reason anyone would want to look up the nth parent of a table. Do I
misunderstand what purpose this syscache serves?

On the other hand I see a few places where a syscache for a particular
child-parent pair might be useful. Would it make sense to create an index and
syscache for that?

I suppose it makes more sense to optimize this on the basis of what's used in
the planner and executor rather than ALTER TABLE commands though. I don't know
what would be helpful there. 

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to