Recursive select
От | Daniel Wickstrom |
---|---|
Тема | Recursive select |
Дата | |
Msg-id | 15117.4171.867564.863408@gargle.gargle.HOWL обсуждение исходный текст |
Ответ на | Recursive select ("Martin Smetak" <minca_sql@no9.cz>) |
Список | pgsql-sql |
>>>>> "Martin" == Martin Smetak <minca_sql@no9.cz> writes: Martin> Hi all! Anyone know if it's possible to make a recursive Martin> select from a table ? My problem: I got atable of "some Martin> categories" which all points to its parrent Martin> one(tree)...shown below. And I want to selectall names of Martin> parrent categories of one child, lets say "fast[4]". Now Martin> I'm solving that with manySQL queries like : "SELECT Martin> main_id FROM cat WHERE id=4;"....but I would like to Martin> optimize this. Martin> Anyone can help or point me to a way ?? The Openacs project has implemented a couple of different methods for handling tree queries. Check out these two threads: http://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0000eC&topic_id=11&topic=OpenACS http://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0000j6&topic_id=12&topic=OpenACS%204%2e0%20Design Regards, Dan Wickstrom
В списке pgsql-sql по дате отправления: