pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Bertheau ☭ <twanger@bluetwanger.de>
To: pgsql-sql@postgresql.org
Subject: SQL equivalent to nested loop
Date: Mon, 06 Jun 2005 18:52:31 +0200
Message-ID: <1118076751.5506.17.camel@dicaprio.akademie1.de> (raw)

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>




view thread (4+ messages)  latest in thread

Message-ID: <1118076751.5506.17.camel@dicaprio.akademie1.de>
Permalink:  ../1118076751.5506.17.camel@dicaprio.akademie1.de/
Also on:    postgresql.org/message-id/1118076751.5506.17.camel@dicaprio.akademie1.de

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: twanger@bluetwanger.de
  Subject: Re: SQL equivalent to nested loop
  In-Reply-To: <1118076751.5506.17.camel@dicaprio.akademie1.de>

* 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