SQL equivalent to nested loop

From: Markus Bertheau ☭ <twanger(at)bluetwanger(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: SQL equivalent to nested loop
Date: 2005-06-06 16:52:31
Message-ID: 1118076751.5506.17.camel@dicaprio.akademie1.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I basically need the SQL equivalent of the following pseudo code:

BEGIN
FOR v IN SELECT * FROM f(4, 'foo') LOOP
FOR w IN SELECT * FROM f(v.id, 'bar') LOOP
RETURN NEXT W
END LOOP;
END LOOP;
RETURN;

Is that possible in SQL?

Markus

--
Markus Bertheau ☭ <twanger(at)bluetwanger(dot)de>

Browse pgsql-sql by date

  From Date Subject
Next Message ON.KG 2005-06-06 17:02:13 Re: What is faster?
Previous Message ON.KG 2005-06-06 16:25:31 What is faster?