Re: Recursive request ... - Mailing list pgsql-sql

From Greg Stark
Subject Re: Recursive request ...
Date
Msg-id 87n0fcjrwo.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: Recursive request ...  (Joe Conway <mail@joeconway.com>)
List pgsql-sql
Joe Conway <mail@joeconway.com> writes:

> BenLaKnet wrote:
> > I see connect by in Oracle
> > ??? is there an equivalent in PostgreSQL or not ??
> 
> Someone is working on the SQL99 equivalent, but it isn't done yet. Perhaps for
> 7.5.

There's a connectby hack in the contrib/tablefunc directory. I haven't used it
so I'm not clear on how powerful it is compared to the real deal, but people
on one of the pgsql lists seemed to find it useful when it came up in the
past.

   connectby(text relname, text keyid_fld, text parent_keyid_fld,               text start_with, int max_depth [, text
branch_delim])    - returns keyid, parent_keyid, level, and an optional branch string     - requires anonymous
compositetype syntax in the FROM clause. See       the instructions in the documentation below.
 


-- 
greg



pgsql-sql by date:

Previous
From: Jonathan Gardner
Date:
Subject: Re: parse error for function def
Next
From: Greg Stark
Date:
Subject: Re: Table Partitioning and Rules