Re: Recursive request ...

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: BenLaKnet <benlaknet(at)icqmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Recursive request ...
Date: 2003-07-18 06:00:23
Message-ID: 87n0fcjrwo.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Joe Conway <mail(at)joeconway(dot)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 composite type syntax in the FROM clause. See
the instructions in the documentation below.

--
greg

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Greg Stark 2003-07-18 06:15:28 Re: Table Partitioning and Rules
Previous Message Derrick Betts 2003-07-17 22:30:10 Return a set of values from postgres Function