Re: Implementing pg_dump_sort.c topological sorting in sql/plpgsql/plperl?
| От | David Fetter |
|---|---|
| Тема | Re: Implementing pg_dump_sort.c topological sorting in sql/plpgsql/plperl? |
| Дата | |
| Msg-id | 20110104165339.GA25139@fetter.org обсуждение |
| Ответ на | Implementing pg_dump_sort.c topological sorting in sql/plpgsql/plperl? (Joel Jacobson <joel@gluefinance.com>) |
| Список | pgsql-hackers |
On Tue, Jan 04, 2011 at 09:29:55AM +0100, Joel Jacobson wrote: > Hi hackers, > > The project I'm currently working with fsnapshot[1], is written in > plain plpgsql and I need to sort all the oids in their > creatable/droppable order. This has already been properly > implemented in pg_dump_sort.c using Knuth's algorithm for > topological sorting, with some special magic to find and break > dependency loops. > > It's not possible to use a plain recursive query to do the trick > (due to 'i' bidirectional dependencies and dependency loops). I believe it is possible. I'll try to do it this evening. 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
В списке pgsql-hackers по дате отправления: