Thread: START WITH and CONNECT BY

START WITH and CONNECT BY

From
"Stephen Schwenker"
Date:
Hello,
 
Has anyone considdered adding the START WITH and CONNECT BY functionallity that Oracle has.  I've been developing for many years now and I find that almost every application we build requires some kind of hierarchical structure.  I know there are other ways of accomplishing this in Postgresql, but I've always found it to be more work than using something simple like the Oracle START WITH/CONNECT BY clause.
 
It's been over 5 years since I've done any c/c++ development but it might be a little fun to work on.  So I was wondering where would be the best place for someone to start if they were to considder developing this functionallity?
 
Thank you
 

Re: START WITH and CONNECT BY

From
Josh Berkus
Date:
Stephan,

> Has anyone considdered adding the START WITH and CONNECT BY functionallity
> that Oracle has.  I've been developing for many years now and I find that
> almost every application we build requires some kind of hierarchical
> structure.  I know there are other ways of accomplishing this in
> Postgresql, but I've always found it to be more work than using something
> simple like the Oracle START WITH/CONNECT BY clause.

From http://developer.postgresql.org/~momjian/TODO.html
   *  Add SQL99 WITH RECURSIVE to SELECT

.... any further discussion should go on PGSQL-SQL list.

--
Josh Berkus
Aglio Database Solutions
San Francisco

Re: START WITH and CONNECT BY

From
Robert Treat
Date:
On Thursday 07 April 2005 18:27, Stephen Schwenker wrote:
> Hello,
>
> Has anyone considdered adding the START WITH and CONNECT BY functionallity
> that Oracle has.  I've been developing for many years now and I find that
> almost every application we build requires some kind of hierarchical
> structure.  I know there are other ways of accomplishing this in
> Postgresql, but I've always found it to be more work than using something
> simple like the Oracle START WITH/CONNECT BY clause.
>
> It's been over 5 years since I've done any c/c++ development but it might
> be a little fun to work on.  So I was wondering where would be the best
> place for someone to start if they were to considder developing this
> functionallity?
>

It's been discussed before and the general consensus has been that it will not
be put into the main line since it is not standards compliant.  Instead the
SQL99 With style recursive syntax is being added.   Some people have
suggested they would like to see both syntaxs supported, if you'd like to
lobby for that you'll need to bring it up on -hackers (but make sure you've
read the archives on it first)

It is worth noting that there is a connectby function included in the
tablefunc contrib module, so you might want to check that out as well, it's
possible it will meet your needs or at least provide a good starting point if
you want to work on this feature.

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL