This is basicly a Join, a cross table i.e.
select b.w from table a, table b where ... |-----Original Message----- |From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] |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 ☭ <[EMAIL PROTECTED]> | | |---------------------------(end of |broadcast)--------------------------- |TIP 7: don't forget to increase your free space map settings | ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend