From: | Joel Jacobson <joel(at)gluefinance(dot)com> |
---|---|
To: | Florian Pflug <fgp(at)phlo(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_depend explained |
Date: | 2011-01-11 22:55:07 |
Message-ID: | AANLkTimao2H55UZt0eiobkf8Dt3=Ng=iOnUZmfSesBEu@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2011/1/11 Florian Pflug <fgp(at)phlo(dot)org>:
> Could you give an example of the kind of trouble you're experiencing trying
> to use a topological sort?
Let's say you have a table t and a view v.
The view v is defined as select * from t;
If we put all objects in a tree, with the public schema as the root,
both v and t will directly under the root, but in reality, v cannot be
created before t.
This is the reason why a normal topological sort doesn't work.
You have to look at the deptype and sort nodes having "internal" edges
between them differently.
The pg_dump source code of course contains all the logic necessary to
do the trick, but it's not that easy to follow.
I guess it's time for plan B, sorting based on oid, no biggie, it will
work for my purpose, but it's damn ugly.
--
Best regards,
Joel Jacobson
Glue Finance
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-01-11 23:06:58 | pg_regress multibyte setting |
Previous Message | Lukas Eder | 2011-01-11 22:54:19 | Re: Fwd: Weird issues when reading UDT from stored function |