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
|