Re: Utility of recursive queries? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Utility of recursive queries?
Date
Msg-id 26575.1081528544@sss.pgh.pa.us
Whole thread Raw
In response to Utility of recursive queries?  (James Robinson <jlrobins@socialserve.com>)
List pgsql-sql
James Robinson <jlrobins@socialserve.com> writes:
> Given a reference to id=3, would a recursive query be the trick to 
> unrolling the list to discover id=1 as the head using a SQL one-liner? 

I think you could do it, but don't have the syntax in my head.

> would any potential recursive query implementation be 
> noticably more efficient that a straightforward implementation in 
> plpgsql

Most likely not ...
        regards, tom lane


pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Utility of recursive queries?
Next
From: Greg Stark
Date:
Subject: Re: SQL challenge--top 10 for each key value?