> The thought that I'd been toying with is to build a list of inter-object > dependencies (using pg_depend if available, else fall back on pg_dump's > native wit, ie, the rather limited set of dependencies it already > understands). Then do a topological sort, preferring to maintain OID > order in cases where the object ordering is underspecified. When the > sort fails (ie, there's a circular dependency) then modify the set of > dumpable objects by breaking some object into two parts (a base > declaration and an ALTER command); this changes the dependencies too. > Repeat the sort and adjustment steps until the sort succeeds. > > If you're not familiar with topological sorts, look at Knuth or your > favorite algorithms text. There are one or two instances of the method > in PG already (deadlock detection, for example).
C'mon - I _do_ have an honours degree in computer science ;) I was actually trying to think of the correct term when i wrote my original email. I had 'PERT charts' in my head, but I couldn't remember the term for the required order of activities - thanks for reminding me :) Chris ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]