Thanks to visit codestin.com
Credit goes to postgrespro.com

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

From Tom Lane
Subject Re: Utility of recursive queries?
Date
Msg-id [email protected]
Whole thread Raw
In response to Utility of recursive queries?  (James Robinson <[email protected]>)
List pgsql-sql
James Robinson <[email protected]> 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?