Re: connectby usage question - Mailing list pgsql-general

From Joe Conway
Subject Re: connectby usage question
Date
Msg-id 455AE3A5.7010803@joeconway.com
Whole thread Raw
In response to connectby usage question  (Eric E <whalesuit@gmail.com>)
List pgsql-general
Eric E wrote:
>
> However, we would like to return a numbering the items based on the
> order they return, like so;
>
> 1 (first item)
> 1.1 (1 branch, 1st item)
> 1.2 (1 branch, 2nd item)
> 1.2.1 (1.2 branch, 1st item)
> 1.2.2
> 1.2.2.1
> 1.3

> etc.
> Is there an option in connectby to do this directly, or do we need to
> write another function to do this?

There is no support for this in connectby, but I imagine it wouldn't be
too hard to hack connectby to do it for you. Probably much easier to do
that than try to add it with another function.

Joe

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: ROWTYPE initialization question
Next
From: "Florian G. Pflug"
Date:
Subject: Recovering deleted or updated rows