From: KÖPFERL Robert <robert.koepferl@sonorys.at>
To: 'Markus Bertheau ?' <twanger@bluetwanger.de>
To: pgsql-sql@postgresql.org
Subject: Re: SQL equivalent to nested loop
Date: Mon, 6 Jun 2005 20:08:07 +0200
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16744@neptun.sonorys.at> (raw)
This is basicly a Join, a cross table
i.e.
select b.w from table a, table b where ...
|-----Original Message-----
|From: twanger@bluetwanger.de [mailto:twanger@bluetwanger.de]
|Sent: Montag, 06. Juni 2005 18:53
|To: pgsql-sql@postgresql.org
|Subject: [SQL] SQL equivalent to nested loop
|
|
|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@bluetwanger.de>
|
|
|---------------------------(end of
|broadcast)---------------------------
|TIP 7: don't forget to increase your free space map settings
|
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: robert.koepferl@sonorys.at, twanger@bluetwanger.de
Subject: Re: SQL equivalent to nested loop
In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB16744@neptun.sonorys.at>
References: <ED4E30DD9C43D5118DFB00508BBBA76EB16744@neptun.sonorys.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox