Re: Wrote a connect-by feature - Mailing list pgsql-hackers

From Bertram Scharpf
Subject Re: Wrote a connect-by feature
Date
Msg-id 20070811032021.GA27511@bart.bertram-scharpf.homelinux.com
Whole thread Raw
In response to Re: Wrote a connect-by feature  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Wrote a connect-by feature  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
Hi,

Am Donnerstag, 09. Aug 2007, 20:44:21 -0400 schrieb Andrew Dunstan:
> Bertram Scharpf wrote:
> >Am Mittwoch, 08. Aug 2007, 14:04:23 +0200 schrieb Bertram Scharpf:
> >>Am Mittwoch, 08. Aug 2007, 00:52:41 +0200 schrieb Bertram Scharpf:
> >>    
> >>>  <http://www.bertram-scharpf.de/tmp/connectby.tar.gz>
> >>>      
> >
> >Nobody's answering just a line. Is it such a bore?
> 
> Isn't connect by the Oracle non-standard way of doing recursive queries? 
> Please review the mailing list archives on this subject.

I sure spent more time and effort on googling for
"recursive" and "hierarchical" than on writing it myself in
the end.

My solution has two features you probably will not find in
any Postgres or other SQL implementation.
 - Inverse lookup. Instead of descending down the tassel   the path leading to the requested element is shown.
 - A boolean field that indicates whether we have reached   the last element of a node. This is useful when drawing   a
tree;you can give a ` instead of a | in front of the   key.
 
     | Bart     false     | Lisa     false     ` Maggie   true
   It takes almost no cost in time and memory.

> Also, many people have their heads down trying to punch out a release, 
> right now.

Wouldn't the release be a good opportunity for providing
this little tool?

Thanks for your answers.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: regexp_matches and regexp_split are inconsistent
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Wrote a connect-by feature