Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] WITH RECURSIVE patch V0.1

From: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Zoltan Boszormenyi <zb(at)cybertec(dot)at>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] WITH RECURSIVE patch V0.1
Date: 2008-05-18 23:30:06
Message-ID: 4830BBFE.5010908@mark.mielke.cc (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Merlin Moncure wrote:
> On Sun, May 18, 2008 at 5:22 PM, Zoltan Boszormenyi <zb(at)cybertec(dot)at> wrote:
>   
>> Can we get the rows in tree order, please? I.e. something like this:
>>     
>
> Is ordering by tree order defined in the standard when no explicit
> order is given?  If not, it probably returns them in the order they
> are pulled up, which might be the fastest way

+1 for the fastest way, which I expect to often be "find all level 1 
matches", "find all level 2 matches", ... If ORDER BY is important, it 
should be specified (although it may be difficult or impossible to 
properly represent ORDER BY for a tree? not sure?) I think most uses of 
recursive require extra client side code to deal with anyways, so only 
relative order is important (order within a particular branch).

There are things I'd like to use this for right now. Currently I use 
plpgsql procedures to implement my own recursion. :-)

Cheers,
mark

-- 
Mark Mielke <mark(at)mielke(dot)cc>

In response to

pgsql-hackers by date

Next:From: Agro-annuaireDate: 2008-05-19 02:04:02
Subject: Agro-annuaire.com vous invite à nous rendre visite au Salon SMA-Med Food 2008 du 20 au 24 mai
Previous:From: Merlin MoncureDate: 2008-05-18 23:02:04
Subject: Re: WITH RECURSIVE patch V0.1

pgsql-patches by date

Next:From: Gregory StarkDate: 2008-05-19 04:21:20
Subject: Re: WITH RECURSIVE patch V0.1
Previous:From: Merlin MoncureDate: 2008-05-18 23:02:04
Subject: Re: WITH RECURSIVE patch V0.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group