(sorry for top posting, iPhone + drunk)
pg_depend_before is a select * from pg_depend before creating the test db model
Sent from my iPhone
On 12 jan 2011, at 20:36, David Fetter <david@fetter.org> wrote:
> On Wed, Jan 12, 2011 at 08:06:24PM +0100, Joel Jacobson wrote:
>> 2011/1/12 Tom Lane <tgl@sss.pgh.pa.us>:
>>> I've sometimes found it useful to think of internal dependencies as
>>> acting like normal dependencies pointing in the other direction.
>>> I'm not sure that would do much to solve your problem, but it might
>>> be worth trying.
>>
>> Tom, you are a genious! No, seriously, I mean it, this is awesome, it
>> worked! YES! You totally saved my day! Thank you! Finally! I'm so
>> happy! :-) :-) :-)
>>
>> This was the little piece of code:
>>
>> CASE WHEN DepType ~ '^(a|ni|in|an|na)$' THEN
>> --- Swap edges
>> ELSE
>> -- Do not swap edges
>> END
>>
>> Look at the attached svg graph how beautiful the automatically
>> generated graph look like now! :-)
>>
>> The tsort of the objects now sort all the normal objects in a creatable order!
>>
>> Here is the result of the tsort (only including the normal objects
>> (the one I care about (I don't have to create the internal/auto
>> objects, nor drop them))):
>>
>> The query below can both produce a DOT-format graph and a tsort of the
>> creatable order of objects:
>>
>> WITH
>> NewObjectOids AS (
>> SELECT * FROM pg_depend WHERE deptype <> 'p'
>> EXCEPT
>> SELECT * FROM pg_depend_before
>
> To what does pg_depend_before refer?
>
> Cheers,
> David.
> --
> David Fetter <david@fetter.org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david.fetter@gmail.com
> iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate