Re: Utility of recursive queries?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Robinson <jlrobins(at)socialserve(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Utility of recursive queries?
Date: 2004-04-09 16:35:44
Message-ID: 26575.1081528544@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

James Robinson <jlrobins(at)socialserve(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Greg Stark 2004-04-09 22:43:25 Re: SQL challenge--top 10 for each key value?
Previous Message Josh Berkus 2004-04-09 16:07:56 Re: Utility of recursive queries?