X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 042D332A7C2 for ; Tue, 12 Oct 2004 14:25:02 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08263-10 for ; Tue, 12 Oct 2004 13:24:53 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id 3A8BC32B355 for ; Tue, 12 Oct 2004 14:24:54 +0100 (BST) Received: from [62.165.4.166] (dicaprio.akademie1.de [62.165.4.166]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id i9CDOlC01144 for ; Tue, 12 Oct 2004 15:24:47 +0200 Subject: PL/pgSQL, RETURN NEXT, ORDER From: Markus Bertheau To: "'pgsql-sql@postgresql.org'" Content-Type: text/plain Message-Id: <1097587488.2649.28.camel@dicaprio.akademie1.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 12 Oct 2004 15:24:48 +0200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200410/83 X-Sequence-Number: 19186 Hi, When I call a PL/pgSQL function that looks roughly like the following: ... FOR x IN SELECT ... ORDER BY ... LOOP RETURN NEXT x; END LOOP; RETURN; END; Is the order of the rows guaranteed to be preserved? Thanks. -- Markus Bertheau