Re: [GENERAL] PL/pgSQL graph enumeration function hangs

2008-06-08 Thread Tino Wildenhain
Charles F. Munat wrote: Thanks, but the join clause is there, it's just buried in the subqueries. If there is a problem, it is probably that the loop never ends. Or it could be that the answer is exponential, and I just have too many rows in the source table and too deep a graph. I figured o

Re: [GENERAL] PL/pgSQL graph enumeration function hangs

2008-06-07 Thread Charles F. Munat
Thanks, but the join clause is there, it's just buried in the subqueries. If there is a problem, it is probably that the loop never ends. Or it could be that the answer is exponential, and I just have too many rows in the source table and too deep a graph. I figured out how to do it in the ap

Re: [GENERAL] PL/pgSQL graph enumeration function hangs

2008-06-06 Thread Tom Lane
"Charles F. Munat" <[EMAIL PROTECTED]> writes: > Using pseudocode from Celko's "SQL for Smarties" book, I wrote the > following function that builds a path enumeration table. I hope to > trigger this function on the rare occasions that the organizations table > is updated. But when I run this funct

[GENERAL] PL/pgSQL graph enumeration function hangs

2008-06-05 Thread Charles F. Munat
I have a table of organizations that has a many-to-many relationship with itself via another table called relationships. The relationships table has a serial id primary key and parent_id and child_id integer fields. The organizations table has a couple thousand records and the maximum depth is

[GENERAL] PL/pgSQL graph enumeration function hangs

2008-06-05 Thread Charles F. Munat
I have a table of organizations that has a many-to-many relationship with itself via another table called relationships. The relationships table has a serial id primary key and parent_id and child_id integer fields. The organizations table has a couple thousand records and the maximum depth is aro