Re: [SQL] how to use recursion to find end nodes of a tree

2006-04-11 Thread mike
TECTED] Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] how to use recursion to find end nodes of a tree > Hello All, > > I have been having a really hard time trying to come up with a > pl/pgsql recursive function to returns the end nodes of a tree. Here > is an example table def

Re: [SQL] how to use recursion to find end nodes of a tree

2006-04-10 Thread Ross Johnson
On Mon, 2006-04-10 at 16:09 +0100, [EMAIL PROTECTED] wrote: > Hello All, > > I have been having a really hard time trying to come up with a pl/pgsql > recursive function to returns the end nodes of a tree. > Here is an example table definition: > > CREATE TABLE parent_child ( > parent_id intege

Re: [SQL] how to use recursion to find end nodes of a tree

2006-04-10 Thread Yasir Malik
Hello All, I have been having a really hard time trying to come up with a pl/pgsql recursive function to returns the end nodes of a tree. Here is an example table definition: CREATE TABLE parent_child ( parent_id integer NOT NULL, child_id integer NOT NULL ); INSERT INTO parent_child (parent_id

[SQL] how to use recursion to find end nodes of a tree

2006-04-10 Thread mike
Hello All, I have been having a really hard time trying to come up with a pl/pgsql recursive function to returns the end nodes of a tree. Here is an example table definition: CREATE TABLE parent_child ( parent_id integer NOT NULL, child_id integer NOT NULL ); INSERT INTO parent_child (parent_i