Joel Jacobson <joel@gluefinance.com> writes:
> I need to figure out the order of creation of all objects, not just
> the dependencies for a single object.
In that case try pg_dump's pg_dump_sort.c. You will never get "the"
order of creation of objects, because that isn't tracked; but you can
find out what a safe order would be.
regards, tom lane